woocsv_schedule_import

Class woocsv_schedule_import.

Defined (1)

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

/include/class-woocsv-schedule-import.php  
  1. class woocsv_schedule_import { 
  2.  
  3. static function import ($batch_code) { 
  4. $batches = get_option('woocsv_batches'); 
  5. //check if the batch exists 
  6. if (!isset($batches[$batch_code])) 
  7. return; 
  8.  
  9. //it exists!!! lets continue; 
  10. $batch = $batches[$batch_code]; 
  11.  
  12. //see if we can influence the time limit 
  13.  
  14. //@TODO make an auto function to import as many rows as possible 
  15. $max_execution_time_original = ini_get('max_execution_time'); 
  16. set_time_limit(0); 
  17. $max_execution_time_new = ini_get('max_execution_time'); 
  18.  
  19. $block_size = 1; 
  20.  
  21.  
  22. //make sure if the row is set 
  23. if (!isset ($batch['row'])) { 
  24. $batch['row'] = 0; 
  25.  
  26. //start 
  27. if ($batch['row'] == 0 ) { 
  28. woocsv_batches::update ($post_data, 'processing row'); 
  29.  
  30.  
  31.