예제 #1
0
 function woo_cd_admin_init()
 {
     // Detect Store Exporter and other platform versions
     woo_cd_detect_ce();
     // Remove disabled widgets from Export screen
     remove_action('woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_date', 10);
     remove_action('woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_status', 10);
     remove_action('woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_customer', 10);
     remove_action('woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_user_role', 10);
     remove_action('woo_ce_export_order_options_after_table', 'woo_ce_orders_order_sorting', 10);
     remove_action('woo_ce_export_after_form', 'woo_ce_products_custom_fields');
     // Add Store Exporter Deluxe widgets to Export screen
     add_action('woo_ce_export_quicklinks', 'woo_cd_quicklink_custom_fields');
     add_action('woo_ce_export_order_options_before_table', 'woo_cd_orders_filter_by_date');
     add_action('woo_ce_export_order_options_before_table', 'woo_cd_orders_filter_by_status');
     add_action('woo_ce_export_order_options_before_table', 'woo_cd_orders_filter_by_customer');
     add_action('woo_ce_export_order_options_before_table', 'woo_cd_orders_filter_by_user_role');
     add_action('woo_ce_export_order_options_after_table', 'woo_cd_orders_order_sorting');
     add_action('woo_ce_export_order_options_before_table', 'woo_cd_orders_items_formatting');
     add_action('woo_ce_export_options_after', 'woo_cd_orders_max_order_items');
     add_action('woo_ce_export_order_options_before_table', 'woo_cd_orders_custom_fields_link');
     add_action('woo_ce_export_after_form', 'woo_cd_products_custom_fields');
     add_action('woo_ce_export_after_form', 'woo_cd_orders_custom_fields');
 }
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

define( 'WOO_CD_DIRNAME', basename( dirname( __FILE__ ) ) );
define( 'WOO_CD_RELPATH', basename( dirname( __FILE__ ) ) . '/' . basename( __FILE__ ) );
define( 'WOO_CD_PATH', plugin_dir_path( __FILE__ ) );
define( 'WOO_CD_PREFIX', 'woo_ce' );

// Turn this on to enable additional debugging options at export time
define( 'WOO_CD_DEBUG', false );

// Disable basic Store Exporter if it is activated
include_once( WOO_CD_PATH . 'common/common.php' );
if( defined( 'WOO_CE_PREFIX' ) == true ) {
	// Detect Store Exporter and other platform versions
	include_once( WOO_CD_PATH . 'includes/install.php' );
	woo_cd_detect_ce();
} else {
	include_once( WOO_CD_PATH . 'includes/functions.php' );
}

function woo_cd_i18n() {

	load_plugin_textdomain( 'woo_ce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );

}
add_action( 'init', 'woo_cd_i18n' );

if( is_admin() ) {

	/* Start of: WordPress Administration */