woocommerce_product_importer_pre_expand_data хук-фильтрWC 1.0

Expand special and internal data into the correct formats for the product CRUD.

Использование

add_filter( 'woocommerce_product_importer_pre_expand_data', 'wp_kama_woocommerce_product_importer_pre_expand_data_filter' );

/**
 * Function for `woocommerce_product_importer_pre_expand_data` filter-hook.
 * 
 * @param array $data Data to import.
 *
 * @return array
 */
function wp_kama_woocommerce_product_importer_pre_expand_data_filter( $data ){

	// filter...
	return $data;
}
$data(массив)
Data to import.

Где вызывается хук

WC_Product_CSV_Importer::expand_data()
woocommerce_product_importer_pre_expand_data
woocommerce/includes/import/class-wc-product-csv-importer.php 846
$data = apply_filters( 'woocommerce_product_importer_pre_expand_data', $data );

Где используется хук в WooCommerce

woocommerce/includes/admin/importers/mappings/shopify.php 90
add_filter( 'woocommerce_product_importer_pre_expand_data', 'wc_importer_shopify_expand_data' );