Hello,
I’d like to modify the query on the “products by tag” block, so that the query matches with AND logic and not OR logic.
To clarify, are you referring to
if ($condition[‘taxonomy’] === ‘product_tag’ && count($condition[‘terms’]) > 1)
?
May I ask did you modify that code? if so, can you provide your code? So that we can get a better idea?
We’ll look forward to hearing from you.
I’m not sure what you mean: I wrote that code, I didn’t modify it. The link to the code is in my original comment. Thanks for your feedback.
Hi,
Thanks for your clarification.
Since this is a development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.
We recommend the following pages/resources as well:
— The WooCommerce Developer Resources Portal.
— WooCommerce Facebook group.
— The #developers
channel of the WooCommerce Community Slack.
Thanks for your feedback. I’ve cross-posted to the community Slack channel.
Plugin Support
con
(@conschneider)
Engineer
Hi Mark,
When you say “products by tag” block – you mean this block here: https://d.pr/i/M5bS88 – correct?
so that the query matches with AND logic and not OR logic.
To my knowledge this setting manages exactly that: https://d.pr/i/SkikSY (?).
Kind regards,
Exactly that! 🤦♂️ Thanks! The question remains though; how to programmatically modify the query on a block like this.
Hi @markhowellsmead
Exactly that!
Thanks for confirming.
The question remains though; how to programmatically modify the query on a block like this
Kindly be informed that support for custom coding is beyond the scope of support we are able to provide in this forum. This particular forum is for questions that are related to the WooCommerce core features.
You can get development related assistance at the channels mentioned above.
For direct assistance with code customizations, we recommend consulting with the WooCommerce Customizations Partners. https://woocommerce.com/customizations/