• Resolved elspearo

    (@elspearo)


    Hi there

    Absolutely great plugin, really fast and easy to use.

    I have a problem in that I can’t get the filters to use the AND operator and filter down when multiple filters are selected.

    If two or more subcategories are selected I want the filters to only show products that make X filter AND Y filters not OR.

    I tried using this function in my functions.php file but it didn’t work:

    https://www.woocommerce-filter.com/hook/woof_main_query_tax_relations/?content_only=1

    PLease assist. I have decided to start a new thread as I haven’t received a response on another thread I commented on.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello

    Please drop me the code that you added

    In file – \plugins\woocommerce-products-filter\index.php comment this line – https://c2n.me/3WYgE3x.png

    Thread Starter elspearo

    (@elspearo)

    Thank you, when I commented the line as you suggested it works now.

    Do I need to add anything else to my functions.php so that it will continue to work if I update the plugin and overwrite the comment?

    Hello

    No! In the new version this line will be commented

    Hi @pavloborysenko,

    I got a similar problem and tried the above approach, but it is not leading to the desired behavior.

    Steps taken:

    – added the snippet to the WP Astra Theme (tried both the parent and child theme’s functions.php)
    – commented the line in \plugins\woocommerce-products-filter\index.php (as hinted above)

    When commenting the line the filter jumps from a product category archive to the generic product archive. I would instead like to have the filter relation AND applied only within the current level of detail (product category archive).

    Looking forward for your input on this!

    • This reply was modified 7 years, 7 months ago by greenlyst.

    Hello @greenlyst

    Try this in plugin settings->Advanced->Options – https://c2n.me/3XdOaia.png

    Hi,
    After the last update, the AND operator stopped working. The operator was configured through the woof_main_query_tax_relations filter. I would appreciate the help you can give me.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘AND Operator not working’ is closed to new replies.