woocommerce_taxonomy_args_(taxonomy_name) filter-hookWC 10.2.0

Filters the arguments for registering the attribute taxonomy.

Usage

add_filter( 'woocommerce_taxonomy_args_(taxonomy_name)', 'wp_kama_woocommerce_taxonomy_args_name_filter' );

/**
 * Function for `woocommerce_taxonomy_args_(taxonomy_name)` filter-hook.
 * 
 * @param array $args Array of taxonomy registration arguments.
 *
 * @return array
 */
function wp_kama_woocommerce_taxonomy_args_name_filter( $args ){

	// filter...
	return $args;
}
$args(array)
Array of taxonomy registration arguments.

Changelog

Since 10.2.0 Introduced.

Where the hook is called

WooCommerceProductImporter::setup_attributes()
woocommerce_taxonomy_args_(taxonomy_name)
WC_Product_Importer::get_attribute_taxonomy_id()
woocommerce_taxonomy_args_(taxonomy_name)
woocommerce/src/Internal/CLI/Migrator/Core/WooCommerceProductImporter.php 659-672
apply_filters(
	'woocommerce_taxonomy_args_' . $taxonomy_name,
	array(
		'labels'       => array(
			'name' => $attr_name,
		),
		'hierarchical' => false,
		'show_ui'      => false,
		'show_in_rest' => true,
		'query_var'    => true,
		'rewrite'      => false,
		'public'       => false,
	)
)
woocommerce/includes/import/abstract-wc-product-importer.php 700-711
apply_filters(
	'woocommerce_taxonomy_args_' . $taxonomy_name,
	array(
		'labels'       => array(
			'name' => $raw_name,
		),
		'hierarchical' => true,
		'show_ui'      => false,
		'query_var'    => true,
		'rewrite'      => false,
	)
)

Where the hook is used in WooCommerce

woocommerce/src/Admin/Features/AsyncProductEditorCategoryField/Init.php 27
add_filter( 'woocommerce_taxonomy_args_product_cat', array( $this, 'add_metabox_args' ) );