• 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

Viewing 1 replies (of 1 total)
  • Thread Starter haitac91

    (@haitac91)

    Hello,

    Can someone help me with this problem? This is a really big problem …
    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Woocommerce exclude specific tags products from related products’ is closed to new replies.