Hello,
I use the following command line to exclude specific tags products from related products:
function exclude_tags_from_related( $tags ){
// array of tags that should be excluded
$exclude_tags = array( ‘dong-ho-thuy-sy’, ‘citizen’, ‘casio’);
foreach( $tags as $index => $tag ){
if( in_array( $tag->slug, $exclude_tags ) ){
unset($tags[$index]);
}
}
return $tags;
}
add_filter( ‘woocommerce_get_related_product_tag_terms’, ‘exclude_tags_from_related’ );
But since the update, the new version of woocommerce near here. It has no effect.
Is there any other way I can exclude specific tags products from related products ?
Thank all