private function __construct()
 {
     if (!class_exists('WooCommerce') or XmlExportEngine::$exportOptions['export_type'] == 'specific' and !in_array('product', XmlExportEngine::$post_types) or XmlExportEngine::$exportOptions['export_type'] == 'advanced' and strpos(XmlExportEngine::$exportOptions['wp_query'], 'product') === false) {
         self::$is_active = false;
         return;
     }
     $this->_woo_data = array('_visibility', '_stock_status', '_downloadable', '_virtual', '_regular_price', '_sale_price', '_purchase_note', '_featured', '_weight', '_length', '_width', '_height', '_sku', '_sale_price_dates_from', '_sale_price_dates_to', '_price', '_sold_individually', '_manage_stock', '_stock', '_upsell_ids', '_crosssell_ids', '_downloadable_files', '_download_limit', '_download_expiry', '_download_type', '_product_url', '_button_text', '_backorders', '_tax_status', '_tax_class', '_product_image_gallery', '_default_attributes', 'total_sales', '_product_attributes', '_product_version');
     $this->_product_data = array('_sku', '_price', '_regular_price', '_sale_price', '_stock_status', '_stock', '_visibility', '_product_url', 'total_sales', 'attributes');
     if (empty(PMXE_Plugin::$session)) {
         $id = $_GET['export_id'];
         $export = new PMXE_Export_Record();
         $export->getById($id);
         if (!$export->isEmpty() and $export->options['export_to'] == 'csv') {
             $this->init_additional_data();
         }
     } else {
         self::$products_data = PMXE_Plugin::$session->get('products_data');
     }
     add_filter("wp_all_export_init_fields", array(&$this, "filter_init_fields"), 10, 1);
     add_filter("wp_all_export_default_fields", array(&$this, "filter_default_fields"), 10, 1);
     add_filter("wp_all_export_other_fields", array(&$this, "filter_other_fields"), 10, 1);
     add_filter("wp_all_export_available_sections", array(&$this, "filter_available_sections"), 10, 1);
     add_filter("wp_all_export_available_data", array(&$this, "filter_available_data"), 10, 1);
     add_filter("wp_all_export_filters", array(&$this, "filter_export_filters"), 10, 1);
 }
示例#2
0
 public function __construct()
 {
     if (!class_exists('WooCommerce') or XmlExportEngine::$exportOptions['export_type'] == 'specific' and !in_array('product', XmlExportEngine::$post_types) or XmlExportEngine::$exportOptions['export_type'] == 'advanced' and strpos(XmlExportEngine::$exportOptions['wp_query'], 'product') === false) {
         self::$is_active = false;
         return;
     }
     $this->_woo_data = array('_visibility', '_stock_status', '_downloadable', '_virtual', '_regular_price', '_sale_price', '_purchase_note', '_featured', '_weight', '_length', '_width', '_height', '_sku', '_sale_price_dates_from', '_sale_price_dates_to', '_price', '_sold_individually', '_manage_stock', '_stock', '_upsell_ids', '_crosssell_ids', '_downloadable_files', '_download_limit', '_download_expiry', '_download_type', '_product_url', '_button_text', '_backorders', '_tax_status', '_tax_class', '_product_image_gallery', '_default_attributes', 'total_sales', '_product_attributes');
 }