Merge pull request #16579 from Chouby/action_before_import

Add action woocommerce_product_import_before_import
This commit is contained in:
Mike Jolley 2017-08-25 11:19:20 +01:00 committed by GitHub
commit 3b3ceebc1f
1 changed files with 2 additions and 0 deletions

View File

@ -807,6 +807,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;