Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mcuypers

    (@mcuypers)

    WooCommerce 7.2.1 did not fix the issue so I guess it’s here to stay

    Thread Starter mcuypers

    (@mcuypers)

    I don’t know why, but it appears that the problem can be solved by adding this code to functions.php . As soon as there is an extra GET parameter for the post type, product results come back.

    add_filter( 'woocommerce_layered_nav_link', 'add_post_type_suffix_to_filter_link', 10, 3 );

    function add_post_type_suffix_to_filter_link( $link, $term, $taxonomy ){
    if (strpos($link,"post_type=product") === false) {
    $link .= "&post_type=product";
    }
    return $link;
    }

    • This reply was modified 2 years, 3 months ago by mcuypers.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Woocommerce 7.2’ is closed to new replies.