woocommerce_product_brands_output filter-hookWC 9.8.0

Filter the brand output in product meta.

Usage

add_filter( 'woocommerce_product_brands_output', 'wp_kama_woocommerce_product_brands_output_filter', 10, 3 );

/**
 * Function for `woocommerce_product_brands_output` filter-hook.
 * 
 * @param string $brand_output The HTML output for brands.
 * @param array  $terms        Array of brand term objects.
 * @param int    $post_id      The product ID.
 *
 * @return string
 */
function wp_kama_woocommerce_product_brands_output_filter( $brand_output, $terms, $post_id ){

	// filter...
	return $brand_output;
}
$brand_output(string)
The HTML output for brands.
$terms(array)
Array of brand term objects.
$post_id(int)
The product ID.

Changelog

Since 9.8.0 Introduced.

Where the hook is called

WC_Brands::show_brand()
woocommerce_product_brands_output
woocommerce/includes/class-wc-brands.php 422
echo apply_filters( 'woocommerce_product_brands_output', $brand_output, $terms, $post->ID ); // phpcs:ignore WordPress.Security.EscapeOutput

Where the hook is used in WooCommerce

Usage not found.