sf_edit_query_args filter – not working after infinity scroll

Forums › Forums › Search & Filter Pro › sf_edit_query_args filter – not working after infinity scroll

Viewing 10 posts – 1 through 10 (of 26 total)
  • Anonymous
    #181280

    When using the sf_edit_query_args filter with WooCommerce the following problem is occurring:

    At page load the filter is working fine. When scrolling to the ‘next page’ with infinite scroll, all the filter options are ‘forgotten’.

    This is the code we are using:

    function filter_products( $query_args, $sfid ) {
    
        $query_args['tax_query'] = [
            'relation' => 'AND',
            [
                'taxonomy' => 'pa_merk',
                'field'    => 'slug',
                'terms'    => array( 'antwrp' ),
            ],[
                'taxonomy' => 'pa_kleur',
                'field'    => 'slug',
                'terms'    => array( '202-medium-grey-chine' ),
            ]
        ];
    
        return $query_args;
    }
    
    add_filter( 'sf_edit_query_args', 'filter_products', 20, 2 );

    Can S&F be forced to keep using this data?
    Thanks!

    Trevor
    #181284
    This reply has been marked as private.
    Anonymous
    #181356
    This reply has been marked as private.
    Trevor
    #181360
    This reply has been marked as private.
    Anonymous
    #181362
    This reply has been marked as private.
    Trevor
    #181368
    This reply has been marked as private.
    Anonymous
    #181372
    This reply has been marked as private.
    Trevor
    #181423
    This reply has been marked as private.
    Anonymous
    #181478
    This reply has been marked as private.
    Trevor
    #181498
    This reply has been marked as private.
Viewing 10 posts – 1 through 10 (of 26 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.