Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Product Query block hijacks all further queries #6950

Closed
sunyatasattva opened this issue Aug 20, 2022 · 0 comments · Fixed by #6952
Closed

Product Query block hijacks all further queries #6950

sunyatasattva opened this issue Aug 20, 2022 · 0 comments · Fixed by #6952
Assignees
Labels
block-type: product-grid Issues related to/affecting all product-grid type blocks. type: bug The issue/PR concerns a confirmed bug.

Comments

@sunyatasattva
Copy link
Contributor

Describe the bug

When you add a Product Query block and select a custom query attribute (i.e. set the toggle to display “On sale products”), adding further Product Query blocks or even normal Query Loop blocks will result in the query always being the filtered one. This is due to the fact that we register the filter every time before we render a Query Loop block.

To reproduce

Steps to reproduce the behavior:

  1. Add a Product Query block
  2. Set the toggle to display “On sale products”
  3. Add another Product Query block on the same page
  4. Do not set the toggle
  5. Add a Query Loop block
  6. Set it to display your posts
  7. Go to the front-end
  8. Notice that all three blocks will display only on sale products

Expected behavior

Each Query Loop block should retain its own query.

@sunyatasattva sunyatasattva added type: bug The issue/PR concerns a confirmed bug. block-type: product-grid Issues related to/affecting all product-grid type blocks. labels Aug 20, 2022
@sunyatasattva sunyatasattva self-assigned this Aug 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block-type: product-grid Issues related to/affecting all product-grid type blocks. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant