AEMexporterwoocsvExport

The Woocommerce CSV Import AEM exporter woocsvExport class.

Defined (1)

The class is defined in the following location(s).

/export/include/woocsvExport.php  
  1. class woocsvExport 
  2.  
  3. protected static $_instance = NULL; 
  4.  
  5. public $admin; 
  6.  
  7. public $product; 
  8.  
  9. public $runner; 
  10.  
  11. public static function instance () 
  12. if (is_null( self::$_instance )) { 
  13. self::$_instance = new self(); 
  14.  
  15. return self::$_instance; 
  16.  
  17. public function __construct () 
  18. $this->loadDependenies(); 
  19.  
  20. $this->loadActions(); 
  21.  
  22. $this->loadFilters(); 
  23.  
  24. public function loadActions () 
  25. //add menu 
  26. add_action( 'admin_menu', array ( $this->admin, 'menu' ), 99 ); 
  27.  
  28. //activate 
  29. register_activation_hook( __FILE__, array ( $this, 'activate' ) ); 
  30.  
  31. //run ajax export 
  32. add_action( 'wp_ajax_woocsv_export', array ( $this->runner, 'start' ) ); 
  33. add_action( 'wp_ajax_delete_export_file', array ( $this, 'delete_export_file' ) ); 
  34.  
  35. public function loadFilters () 
  36. //nothing yet 
  37.  
  38. public function loadDependenies () 
  39.  
  40. $this->admin = new woocsvExportAdmin(); 
  41. $this->product = new woocsvExportProduct(); 
  42. $this->runner = new ajaxExport( new csvWriter() ); 
  43.  
  44.  
  45. public function activate () 
  46. //nothing yet 
  47.  
  48. public function delete_export_file () 
  49.  
  50. if (isset($_POST[ 'filename' ])) { 
  51. @unlink( $_POST[ 'filename' ] ); 
  52. wp_die( 0 );