AEMexportercsvWriter

The Woocommerce CSV Import AEM exporter csvWriter class.

Defined (1)

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

/export/include/csvWriter.php  
  1. class csvWriter implements writerInterface 
  2.  
  3. private $current_run; 
  4.  
  5. public function load () 
  6. $this->current_run = get_option( 'woocsv_export_current' ); 
  7.  
  8. public function write ($data) { 
  9. $this->load(); 
  10.  
  11. if ( ! $this->current_run) { 
  12. return; 
  13.  
  14. $fp = fopen( $this->current_run[ 'filename' ], 'a' ); 
  15. fputcsv( $fp, $data ); 
  16. fclose( $fp ); 
  17.