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

Product Query: custom implementation of inherit query from template #6863

Closed
Tracked by #42616
sunyatasattva opened this issue Aug 5, 2022 · 1 comment · Fixed by #7382
Closed
Tracked by #42616

Product Query: custom implementation of inherit query from template #6863

sunyatasattva opened this issue Aug 5, 2022 · 1 comment · Fixed by #7382
Labels
block-type: product-grid Issues related to/affecting all product-grid type blocks. focus: FSE Work related to prepare WooCommerce for FSE. type: enhancement The issue is a request for an enhancement.

Comments

@sunyatasattva
Copy link
Contributor

sunyatasattva commented Aug 5, 2022

As we want to minimize changes we do in Gutenberg, we need to override the setting “Inherit Query from Template” in our block variation because, in the current implementation of the PostTemplate, Gutenberg uses the global $wp_query and our current proposal would not be applicable without a big refactor.

Instead, our Product Query block will always use the filter we introduce above, and we'll handle the global $wp_query on our side.

We need to implement three functionalities in the long term:

  1. Adding an option equivalent to “Inherit Query from Template” (perhaps even visually identical) to make the Product Query compatible with FSE templates.
  2. Merge more specific queries into the global query
  3. Merge query parameters from the URL into the global query to allow compatibility with filters (Product Query: Generate the custom query by filters applied #6791)

Depends on: sunyatasattva/gutenberg#2

@sunyatasattva sunyatasattva added type: enhancement The issue is a request for an enhancement. block-type: product-grid Issues related to/affecting all product-grid type blocks. focus: FSE Work related to prepare WooCommerce for FSE. labels Aug 5, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2022

This issue has been marked as stale because it has not seen any activity within the past 60 days. Our team uses this tool to help surface issues for review. If you are the author of the issue there's no need to comment as it will be looked at.

Internal: After 10 days with no activity this issue will be automatically be closed.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Oct 8, 2022
@sunyatasattva sunyatasattva removed the status: stale Stale issues and PRs have had no updates for 60 days. label Oct 10, 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. focus: FSE Work related to prepare WooCommerce for FSE. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant