register_taxonomy_product_brand filter-hookWC 9.4.0

Filter the brand taxonomy.

Usage

add_filter( 'register_taxonomy_product_brand', 'wp_kama_register_taxonomy_product_brand_filter' );

/**
 * Function for `register_taxonomy_product_brand` filter-hook.
 * 
 * @param array $args Args.
 *
 * @return array
 */
function wp_kama_register_taxonomy_product_brand_filter( $args ){

	// filter...
	return $args;
}
$args(array)
Args.

Changelog

Since 9.4.0 Introduced.

Where the hook is called

WC_Brands::init_taxonomy()
register_taxonomy_product_brand
woocommerce/includes/class-wc-brands.php 263-302
apply_filters(
	'register_taxonomy_product_brand',
	array(
		'hierarchical'          => true,
		'update_count_callback' => '_update_post_term_count',
		'label'                 => __( 'Brands', 'woocommerce' ),
		'labels'                => array(
			'name'              => __( 'Brands', 'woocommerce' ),
			'singular_name'     => __( 'Brand', 'woocommerce' ),
			'template_name'     => _x( 'Products by Brand', 'Template name', 'woocommerce' ),
			'search_items'      => __( 'Search Brands', 'woocommerce' ),
			'all_items'         => __( 'All Brands', 'woocommerce' ),
			'parent_item'       => __( 'Parent Brand', 'woocommerce' ),
			'parent_item_colon' => __( 'Parent Brand:', 'woocommerce' ),
			'edit_item'         => __( 'Edit Brand', 'woocommerce' ),
			'update_item'       => __( 'Update Brand', 'woocommerce' ),
			'add_new_item'      => __( 'Add New Brand', 'woocommerce' ),
			'new_item_name'     => __( 'New Brand Name', 'woocommerce' ),
			'not_found'         => __( 'No Brands Found', 'woocommerce' ),
			'back_to_items'     => __( '← Go to Brands', 'woocommerce' ),
		),

		'show_ui'               => true,
		'show_admin_column'     => true,
		'show_in_nav_menus'     => true,
		'show_in_rest'          => true,
		'capabilities'          => array(
			'manage_terms' => 'manage_product_terms',
			'edit_terms'   => 'edit_product_terms',
			'delete_terms' => 'delete_product_terms',
			'assign_terms' => 'assign_product_terms',
		),

		'rewrite'               => array(
			'slug'         => $slug,
			'with_front'   => false,
			'hierarchical' => true,
		),
	)
)

Where the hook is used in WooCommerce

Usage not found.