diff --git a/includes/import/abstract-wc-product-importer.php b/includes/import/abstract-wc-product-importer.php index 640e7c533b3..84df5bda2c1 100644 --- a/includes/import/abstract-wc-product-importer.php +++ b/includes/import/abstract-wc-product-importer.php @@ -79,6 +79,16 @@ abstract class WC_Product_Importer implements WC_Importer_Interface { */ protected $parsed_data = array(); + /** + * Start time of current import. + * + * (default value: 0) + * + * @var int + * @access protected + */ + protected $start_time = 0; + /** * Get file raw headers. * diff --git a/includes/import/class-wc-product-csv-importer.php b/includes/import/class-wc-product-csv-importer.php index ee331caa96b..a5200dd8a79 100644 --- a/includes/import/class-wc-product-csv-importer.php +++ b/includes/import/class-wc-product-csv-importer.php @@ -637,8 +637,9 @@ class WC_Product_CSV_Importer extends WC_Product_Importer { * @return array */ public function import() { - $index = 0; - $data = array( + $this->start_time = time(); + $index = 0; + $data = array( 'imported' => array(), 'failed' => array(), 'updated' => array(),