diff --git a/plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection.php b/plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection.php index 8d8b01cc80c..ae138b3a1c5 100644 --- a/plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection.php +++ b/plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection.php @@ -1829,6 +1829,18 @@ class ProductCollection extends AbstractBlock { * Registers any handlers for the core collections. */ protected function register_core_collections() { + $this->register_collection_handlers( + 'woocommerce/product-collection/hand-picked', + function ( $collection_args, $common_query_values, $query ) { + // Hand-picked product collections should hide the results if no products are selected. + if ( empty( $query['handpicked_products'] ) ) { + return array( + 'post__in' => array( -1 ), + ); + } + } + ); + $this->register_collection_handlers( 'woocommerce/product-collection/related', function ( $collection_args ) {