From 5a2969feabd5c475d93eba4700bf0c3b4f185826 Mon Sep 17 00:00:00 2001 From: Manish Menaria Date: Thu, 19 Sep 2024 18:09:23 +0530 Subject: [PATCH] Improve comment for empty Hand-Picked collection --- .../woocommerce/src/Blocks/BlockTypes/ProductCollection.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection.php b/plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection.php index ae138b3a1c5..243a70d8ec9 100644 --- a/plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection.php +++ b/plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection.php @@ -1832,7 +1832,8 @@ class ProductCollection extends AbstractBlock { $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. + // For Hand-Picked collection, if no products are selected, we should return an empty result set. + // This ensures that the collection doesn't display any products until the user explicitly chooses them. if ( empty( $query['handpicked_products'] ) ) { return array( 'post__in' => array( -1 ),