woocommerce_product_importer_pre_expand_data
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.
Где вызывается хук
woocommerce_product_importer_pre_expand_data
woocommerce/includes/import/class-wc-product-csv-importer.php 878
$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' );