Hide 'order by' control for the Hand-Picked collection

This commit is contained in:
Bart Kalisz 2024-09-09 17:27:55 +02:00 committed by Christopher Allford
parent 16bb48c5a0
commit 88e04f1b3a
No known key found for this signature in database
GPG Key ID: 80E44C778F08A88E
1 changed files with 4 additions and 1 deletions

View File

@ -86,7 +86,10 @@ const ProductCollectionInspectorControls = (
const showFilterableControl =
! isArchiveTemplate && shouldShowFilter( CoreFilterNames.FILTERABLE );
const showOrderControl =
showQueryControls && shouldShowFilter( CoreFilterNames.ORDER );
showQueryControls &&
shouldShowFilter( CoreFilterNames.ORDER ) &&
// See https://github.com/woocommerce/woocommerce/issues/50862
attributes.collection !== 'woocommerce/product-collection/hand-picked';
const showOnSaleControl = shouldShowFilter( CoreFilterNames.ON_SALE );
const showStockStatusControl = shouldShowFilter(
CoreFilterNames.STOCK_STATUS