• Hi,
    I’m developing an e-shop that sells men and women clothes where “men” and “women” are woocommerce categories among others.
    Basically I would like to customize related products so that they don’t show “men” products if I’m in a “women” product page and vice versa.
    I guess I need to use

    add_filter( 'woocommerce_product_related_posts_relate_by_category', function() {
        //and add some conditions here
    });

    but I don’t know the conditions to point the current product category and the “man”-“women” category.
    Am I on the right path?
    Thank you for any answer

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Set related products according to current product category’ is closed to new replies.