woocommerce_product_importer_parsed_data
Filter product importer parsed data.
Usage
add_filter( 'woocommerce_product_importer_parsed_data', 'wp_kama_woocommerce_product_importer_parsed_data_filter', 10, 2 );
/**
* Function for `woocommerce_product_importer_parsed_data` filter-hook.
*
* @param array $parsed_data Parsed data.
* @param WC_Product_Importer $importer Importer instance.
*
* @return array
*/
function wp_kama_woocommerce_product_importer_parsed_data_filter( $parsed_data, $importer ){
// filter...
return $parsed_data;
}
- $parsed_data(array)
- Parsed data.
- $importer(WC_Product_Importer)
- Importer instance.
Changelog
Where the hook is called
woocommerce_product_importer_parsed_data
woocommerce_product_importer_parsed_data
woocommerce/includes/import/class-wc-product-csv-importer.php 1102
$this->parsed_data[] = apply_filters( 'woocommerce_product_importer_parsed_data', $this->expand_data( $data ), $this );
woocommerce/includes/import/abstract-wc-product-importer.php 133
return apply_filters( 'woocommerce_product_importer_parsed_data', $this->parsed_data, $this );