Example #1
0
 public function __construct()
 {
     parent::__construct();
     // called from category tree
     add_action('wp_ajax_e2e_get_ebay_categories_tree', array(&$this, 'ajax_get_ebay_categories_tree'));
     add_action('wp_ajax_e2e_get_store_categories_tree', array(&$this, 'ajax_get_store_categories_tree'));
     // called from edit products page
     add_action('wp_ajax_wpl_getCategorySpecifics', array(&$this, 'ajax_getCategorySpecifics'));
     add_action('wp_ajax_wpl_getCategoryConditions', array(&$this, 'ajax_getCategoryConditions'));
     // called from jobs window
     add_action('wp_ajax_wpl_jobs_load_tasks', array(&$this, 'jobs_load_tasks'));
     add_action('wp_ajax_wpl_jobs_run_task', array(&$this, 'jobs_run_task'));
     add_action('wp_ajax_wpl_jobs_complete_job', array(&$this, 'jobs_complete_job'));
     // logfile viewer
     add_action('wp_ajax_wplister_tail_log', array(&$this, 'ajax_wplister_tail_log'));
     // profile selector
     add_action('wp_ajax_wple_select_profile', array(&$this, 'ajax_wple_select_profile'));
     add_action('wp_ajax_wple_show_profile_selection', array(&$this, 'ajax_wple_show_profile_selection'));
     // product matcher
     add_action('wp_ajax_wple_show_product_matches', array(&$this, 'ajax_wple_show_product_matches'));
     // handle dynamic listing galleries
     add_action('wp_ajax_wpl_gallery', array(&$this, 'ajax_wpl_gallery'));
     add_action('wp_ajax_nopriv_wpl_gallery', array(&$this, 'ajax_wpl_gallery'));
     // handle request for eBay store categories (JSON)
     add_action('wp_ajax_wpl_ebay_store_categories', array(&$this, 'ajax_wpl_ebay_store_categories'));
     add_action('wp_ajax_nopriv_wpl_ebay_store_categories', array(&$this, 'ajax_wpl_ebay_store_categories'));
     // handle request for eBay item queries
     add_action('wp_ajax_wpl_ebay_item_query', array(&$this, 'ajax_wpl_ebay_item_query'));
     add_action('wp_ajax_nopriv_wpl_ebay_item_query', array(&$this, 'ajax_wpl_ebay_item_query'));
     // handle incoming ebay notifications
     add_action('wp_ajax_handle_ebay_notify', array(&$this, 'ajax_handle_ebay_notify'));
     add_action('wp_ajax_nopriv_handle_ebay_notify', array(&$this, 'ajax_handle_ebay_notify'));
 }
Example #2
0
 public function __construct()
 {
     parent::__construct();
     // add cron handler
     add_action('wplister_update_auctions', array(&$this, 'cron_update_auctions'));
     add_action('wple_daily_schedule', array(&$this, 'cron_daily_schedule'));
     // add internal action hooks
     add_action('wple_clean_log_table', array(&$this, 'action_clean_log_table'));
     add_action('wple_clean_listing_archive', array(&$this, 'action_clean_listing_archive'));
 }
Example #3
0
 public function __construct()
 {
     parent::__construct();
     self::$PLUGIN_URL = WPLISTER_URL;
     self::$PLUGIN_DIR = WPLISTER_PATH;
     // add link to settings on plugins page
     add_action('plugin_action_links', array(&$this, 'onWpPluginActionLinks'), 10, 4);
     // required for saving custom screen options
     add_filter('set-screen-option', array(&$this, 'set_screen_option_handler'), 100, 3);
     $this->initErrorHandler();
 }
Example #4
0
 public function __construct()
 {
     parent::__construct();
     self::$PLUGIN_URL = WPLISTER_URL;
     self::$PLUGIN_DIR = WPLISTER_PATH;
     $this->main_admin_menu_label = get_option('wplister_admin_menu_label', $this->app_name);
     $this->main_admin_menu_label = $this->main_admin_menu_label ? $this->main_admin_menu_label : $this->app_name;
     $this->main_admin_menu_slug = sanitize_key(str_replace(' ', '-', $this->main_admin_menu_label));
     add_action('admin_menu', array(&$this, 'onWpAdminMenu'), 20);
     if (is_admin()) {
         add_action('plugins_loaded', array(&$this, 'handleSubmit'));
     }
 }
Example #5
0
 public function __construct()
 {
     parent::__construct();
     // revise inventory status on eBay
     add_action('wplister_revise_inventory_status', array(&$this, 'wplister_revise_inventory_status'), 10, 1);
     // revise item on eBay
     add_action('wplister_revise_item', array(&$this, 'wplister_revise_item'), 10, 1);
     add_action('wplister_relist_item', array(&$this, 'wplister_relist_item'), 10, 1);
     add_action('wplister_end_item', array(&$this, 'wplister_end_item'), 10, 2);
     // re-apply profile and mark listing item as changed
     add_action('wplister_product_has_changed', array(&$this, 'wplister_product_has_changed'), 10, 1);
     // create new prepared listing from product and profile
     add_action('wplister_prepare_listing', array(&$this, 'wplister_prepare_listing'), 10, 2);
     // process inventory changes from amazon
     add_action('wpla_inventory_status_changed', array(&$this, 'wpla_inventory_status_changed'), 10, 1);
     // process product updates triggered via the WooCommerce REST API
     // TODO: process 2nd parameter ($data) - if only stock and/or price are updated, use ReviseInventoryStatus
     add_action('woocommerce_api_edit_product', array(&$this, 'wplister_product_has_changed'), 20, 1);
     // WC REST API					PUT /wc-api/v2/products/1234
     // handle ajax requests from third party CSV import plugins
     add_action('wp_ajax_woo-product-importer-ajax', array(&$this, 'handle_third_party_ajax_csv_import'), 1, 1);
     // Woo Product Importer 		https://github.com/dgrundel/woo-product-importer
     add_action('wp_ajax_woocommerce_csv_import_request', array(&$this, 'handle_third_party_ajax_csv_import'), 1, 1);
     // Product CSV Import Suite 	http://www.woothemes.com/products/product-csv-import-suite/
     add_action('wp_ajax_runImport', array(&$this, 'handle_third_party_ajax_csv_import'), 1, 1);
     // WooCommerce CSV importer 2.x	http://wordpress.org/plugins/woocommerce-csvimport/
     add_action('wp_ajax_run_import', array(&$this, 'handle_third_party_ajax_csv_import'), 1, 1);
     // WooCommerce CSV importer 3.x	http://wordpress.org/plugins/woocommerce-csvimport/
     // add_action( 'load-all-import_page_pmxi-admin-import', array( &$this, 'handle_third_party_ajax_csv_import' ), 1, 1 );	// WP All Import
     add_action('pmxi_saved_post', array(&$this, 'wplister_product_has_changed'), 20, 1);
     // WP All Import				http://www.wpallimport.com/documentation/advanced/action-reference/
     // trigger 3rd party import mode if called from custom cron implementation
     // example: /wp-content/plugins/wwc-amz-aff/do-cron.php for WooCommerce Amazon Affiliates plugin
     // deactivated as it seems to cause problems with wwc-amz-aff
     // if ( 'do-cron.php' == basename( $_SERVER['SCRIPT_NAME'] ) )
     // 	$this->handle_third_party_ajax_csv_import();
     // example of using wplister_custom_attributes filter to add SKU as a virtual attribute
     add_filter('wplister_custom_attributes', array(&$this, 'wplister_custom_attributes'), 10, 1);
     add_filter('wplister_custom_attributes', array(&$this, 'wplister_custom_brand_attribute'), 10, 1);
     // add support for Store Exporter plugin (http://www.visser.com.au/documentation/store-exporter/usage/)
     add_filter('woo_ce_product_fields', array(&$this, 'woo_ce_product_fields'));
     add_filter('woo_ce_product_item', array(&$this, 'woo_ce_product_item'), 10, 2);
     // process CompleteSale requests from other plugins
     add_action('wple_complete_sale_on_ebay', array(&$this, 'wple_complete_sale_on_ebay'), 10, 2);
 }