From 04b6e800659c7174e55248d4af5db6ec433fb02c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demarle?= Date: Wed, 23 Aug 2017 09:37:41 +0200 Subject: [PATCH] Add action woocommerce_product_import_before_import --- includes/import/class-wc-product-csv-importer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/import/class-wc-product-csv-importer.php b/includes/import/class-wc-product-csv-importer.php index 6ee73992898..9ae3a086f59 100644 --- a/includes/import/class-wc-product-csv-importer.php +++ b/includes/import/class-wc-product-csv-importer.php @@ -806,6 +806,8 @@ class WC_Product_CSV_Importer extends WC_Product_Importer { ); foreach ( $this->parsed_data as $parsed_data_key => $parsed_data ) { + do_action( 'woocommerce_product_import_before_import', $parsed_data ); + $id = isset( $parsed_data['id'] ) ? absint( $parsed_data['id'] ) : 0; $sku = isset( $parsed_data['sku'] ) ? esc_attr( $parsed_data['sku'] ) : ''; $id_exists = false;