Commit d515a90764 for woocommerce

commit d515a90764050f2cef83264da285c5eeeacc0ac8
Author: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
Date:   Fri Jan 30 19:17:46 2026 +0100

    Product Collection: fix lack of `queryId` warning when block is saved in a picker state (#63032)

    * Prevent warnings when there's no queryId if Product Collection is saved in a picker state

    * Add changelog

    * Fix typo in changelog

diff --git a/plugins/woocommerce/changelog/fix-product-collection-picker-lack-of-queryid b/plugins/woocommerce/changelog/fix-product-collection-picker-lack-of-queryid
new file mode 100644
index 0000000000..15c5ed3be0
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-product-collection-picker-lack-of-queryid
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Product Collection: prevent warnings if block is saved in a picker state
diff --git a/plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection/Controller.php b/plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection/Controller.php
index a7430dbe25..96c5faadca 100644
--- a/plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection/Controller.php
+++ b/plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection/Controller.php
@@ -155,7 +155,8 @@ class Controller extends AbstractBlock {
 		if (
 			$is_product_collection_block &&
 			'woocommerce/product-collection' === $block_name &&
-			! $force_page_reload_global
+			! $force_page_reload_global &&
+			isset( $parsed_block['attrs']['queryId'] )
 		) {
 			$enhanced_query_stack[] = $parsed_block['attrs']['queryId'];

@@ -179,7 +180,7 @@ class Controller extends AbstractBlock {
 						return $content;
 					}

-					if ( isset( $dirty_enhanced_queries[ $block['attrs']['queryId'] ] ) ) {
+					if ( isset( $block['attrs']['queryId'] ) && isset( $dirty_enhanced_queries[ $block['attrs']['queryId'] ] ) ) {
 						wp_interactivity_config( 'core/router', array( 'clientNavigationDisabled' => true ) );
 						$dirty_enhanced_queries[ $block['attrs']['queryId'] ] = null;
 					}