How to show custom link if specific brand
-
Hi want to show a link to another internal page if current brand name is KB. Tried the code above but it doesnt work.
function brands_on_single_product_page() { global $product; $brands = get_the_terms( $product->get_id() , 'yith_product_brand'); foreach( $brands as $brand ) { if($brand->name == 'KB') { echo 'link to somewhere '; } } } add_action('woocommerce_single_product_summary', 'brands_on_single_product_page', 30);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to show custom link if specific brand’ is closed to new replies.