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

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

add_filter( 'woocommerce_csv_product_import_mapping_default_columns', 'wp_kama_woocommerce_csv_product_import_mapping_default_columns_filter', 10, 2 );

/**
 * Function for `woocommerce_csv_product_import_mapping_default_columns` filter-hook.
 * 
 * @param  $array       
 * @param  $raw_headers 
 *
 * @return 
 */
function wp_kama_woocommerce_csv_product_import_mapping_default_columns_filter( $array, $raw_headers ){

	// filter...
	return $array;
}
$array
-
$raw_headers
-

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

WC_Product_CSV_Importer_Controller::auto_map_columns()
woocommerce_csv_product_import_mapping_default_columns
woocommerce/includes/admin/importers/class-wc-product-csv-importer-controller.php 641-689
apply_filters(
	'woocommerce_csv_product_import_mapping_default_columns',
	array(
		__( 'ID', 'woocommerce' )             => 'id',
		__( 'Type', 'woocommerce' )           => 'type',
		__( 'SKU', 'woocommerce' )            => 'sku',
		__( 'Name', 'woocommerce' )           => 'name',
		__( 'Published', 'woocommerce' )      => 'published',
		__( 'Is featured?', 'woocommerce' )   => 'featured',
		__( 'Visibility in catalog', 'woocommerce' ) => 'catalog_visibility',
		__( 'Short description', 'woocommerce' ) => 'short_description',
		__( 'Description', 'woocommerce' )    => 'description',
		__( 'Date sale price starts', 'woocommerce' ) => 'date_on_sale_from',
		__( 'Date sale price ends', 'woocommerce' ) => 'date_on_sale_to',
		__( 'Tax status', 'woocommerce' )     => 'tax_status',
		__( 'Tax class', 'woocommerce' )      => 'tax_class',
		__( 'In stock?', 'woocommerce' )      => 'stock_status',
		__( 'Stock', 'woocommerce' )          => 'stock_quantity',
		__( 'Backorders allowed?', 'woocommerce' ) => 'backorders',
		__( 'Low stock amount', 'woocommerce' ) => 'low_stock_amount',
		__( 'Sold individually?', 'woocommerce' ) => 'sold_individually',
		/* translators: %s: Weight unit */
		sprintf( __( 'Weight (%s)', 'woocommerce' ), $weight_unit_label ) => 'weight',
		/* translators: %s: Length unit */
		sprintf( __( 'Length (%s)', 'woocommerce' ), $dimension_unit_label ) => 'length',
		/* translators: %s: Width unit */
		sprintf( __( 'Width (%s)', 'woocommerce' ), $dimension_unit_label ) => 'width',
		/* translators: %s: Height unit */
		sprintf( __( 'Height (%s)', 'woocommerce' ), $dimension_unit_label ) => 'height',
		__( 'Allow customer reviews?', 'woocommerce' ) => 'reviews_allowed',
		__( 'Purchase note', 'woocommerce' )  => 'purchase_note',
		__( 'Sale price', 'woocommerce' )     => 'sale_price',
		__( 'Regular price', 'woocommerce' )  => 'regular_price',
		__( 'Categories', 'woocommerce' )     => 'category_ids',
		__( 'Tags', 'woocommerce' )           => 'tag_ids',
		__( 'Shipping class', 'woocommerce' ) => 'shipping_class_id',
		__( 'Images', 'woocommerce' )         => 'images',
		__( 'Download limit', 'woocommerce' ) => 'download_limit',
		__( 'Download expiry days', 'woocommerce' ) => 'download_expiry',
		__( 'Parent', 'woocommerce' )         => 'parent_id',
		__( 'Upsells', 'woocommerce' )        => 'upsell_ids',
		__( 'Cross-sells', 'woocommerce' )    => 'cross_sell_ids',
		__( 'Grouped products', 'woocommerce' ) => 'grouped_products',
		__( 'External URL', 'woocommerce' )   => 'product_url',
		__( 'Button text', 'woocommerce' )    => 'button_text',
		__( 'Position', 'woocommerce' )       => 'menu_order',
	),
	$raw_headers
)

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

woocommerce/includes/admin/class-wc-admin-brands.php 89
add_filter( 'woocommerce_csv_product_import_mapping_default_columns', array( $this, 'add_default_column_mapping' ), 10 );
woocommerce/includes/admin/importers/mappings/default.php 85
add_filter( 'woocommerce_csv_product_import_mapping_default_columns', 'wc_importer_default_english_mappings', 100 );
woocommerce/includes/admin/importers/mappings/generic.php 31
add_filter( 'woocommerce_csv_product_import_mapping_default_columns', 'wc_importer_generic_mappings' );
woocommerce/includes/admin/importers/mappings/shopify.php 44
add_filter( 'woocommerce_csv_product_import_mapping_default_columns', 'wc_importer_shopify_mappings', 10, 2 );
woocommerce/includes/admin/importers/mappings/wordpress.php 31
add_filter( 'woocommerce_csv_product_import_mapping_default_columns', 'wc_importer_wordpress_mappings' );