-
Notifications
You must be signed in to change notification settings - Fork 219
Product Query: allow adding more arguments by applying a filter. #6069
Conversation
Size Change: +45 B (0%) Total Size: 862 kB
ℹ️ View Unchanged
|
Hey @cpapazoglou! We don't use filters for Store API and prefer to use extensibility methods that only append data to the response, this is to ensure stability in our requests and ensure a consistent, predictable, schema, something we can't do with filters. Can you walk me through your case, we might be able to provide alternative solutions that still fulfil that. If not, you can follow this file to add |
👋 @senadir! |
While working on 12894-gh-Automattic/woocommerce.com I have noticed that there aren't any hooks allowing us to extend what arguments can be passed to the
wc/store/products/
API. This PR aims at allowing code outside of this repo to hook into$query_args
before it gets passed toWP_Query();
https://github.com/Automattic/woocommerce.com/blob/476e2a09a2b6e9ff175b9230054ce6ad6dd871a6/plugins/woo-gutenberg-products-block/src/StoreApi/Utilities/ProductQuery.php#L242-L243
Accessibility
prefers-reduced-motion
Other Checks
Screenshots
Testing
Automated Tests
Manual Testing
How to test the changes in this Pull Request:
Perhaps it will be easier testing this 12894-gh-Automattic/woocommerce.com
User Facing Testing
These are steps for user testing (where "user" is someone interacting with this change that is not editing any code).
Performance Impact
Changelog