-
Notifications
You must be signed in to change notification settings - Fork 219
[Product Query] Add support for the Filter Products By Stock block #7251
Conversation
…ocks into fix/product-query-update
…ocks into add/price_filter_support
Product Query - Add support for the Filter By Price Block
Product Query - Add support for the Filter By Attributes block
…erce/woocommerce-blocks into add/price_filter_support
…erce/woocommerce-blocks into add/attribute_filter_support
…commerce/woocommerce-blocks into add/attribute_filter_support
…ocks into add/attribute_filter_support
…ocks into add/attribute_filter_support
Product Query - Add support for the Filter By Stock Block
The release ZIP for this PR is accessible via:
|
Size Change: 0 B Total Size: 999 kB ℹ️ View Unchanged
|
This PR has been marked as If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label - otherwise it will automatically be closed after 10 days. |
This PR has been marked as If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label. |
…ocks into add/stock_filter_support
…erce/woocommerce-blocks into add/stock_filter_support
e3cd271
to
027ab12
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I left one minor comment about using a WC core function to retrieve the stock statuses.
src/BlockTypes/StockFilter.php
Outdated
protected $block_name = 'stock-filter'; | ||
protected $block_name = 'stock-filter'; | ||
const STOCK_STATUS_QUERY_VAR = 'filter_stock_status'; | ||
const STOCK_STATUS_QUERY_VAR_VALUES = array( 'instock', 'outofstock', 'onbackorder' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use the stock statuses returned by wc_get_product_stock_status_options()
instead of hardcoding them? This way this will be compatible with any extension hooking into the woocommerce_product_stock_status_options
filter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I addressed the feedback with d23d6a0.
…ocks into add/stock_filter_support
Script Dependencies ReportThe
This comment was automatically generated by the |
…oocommerce#7251) * Product Query: Fix pagination issue * Product Query - Add support for the Filter By Price Block woocommerce#6790 Product Query - Add support for the Filter By Price Block * fix query relation * fix on sale query * Product Query - Add support for the Filter By Attributes block woocommerce#6790 Product Query - Add support for the Filter By Attributes block * fix bugged pagination and on-sale filter after refactor * address feedback * Product Query - Add support for the Filter By Stock Block woocommerce#6790 Product Query - Add support for the Filter By Stock Block * address feedback
This PR adds support for the Filter By Stock block. This PR is blocked by #7186.
#6790
Screenshots
Screen.Capture.on.2022-09-29.at.14-38-33.mov
Testing
Automated Tests
User Facing Testing
WooCommerce Visibility
Performance Impact
Changelog