diff --git a/plugins/woocommerce/changelog/44808-dev-fix-fatal-interactivity b/plugins/woocommerce/changelog/44808-dev-fix-fatal-interactivity new file mode 100644 index 00000000000..6dc89f50aa5 --- /dev/null +++ b/plugins/woocommerce/changelog/44808-dev-fix-fatal-interactivity @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix a possible fatal exception setting a duplicate asset registry key `needsRefreshForInteractivityAPI` \ No newline at end of file diff --git a/plugins/woocommerce/src/Blocks/BlockTypes/ClassicTemplate.php b/plugins/woocommerce/src/Blocks/BlockTypes/ClassicTemplate.php index c23a4366393..cace93045de 100644 --- a/plugins/woocommerce/src/Blocks/BlockTypes/ClassicTemplate.php +++ b/plugins/woocommerce/src/Blocks/BlockTypes/ClassicTemplate.php @@ -49,7 +49,7 @@ class ClassicTemplate extends AbstractDynamicBlock { // Indicate to interactivity powered components that this block is on the page, // and needs refresh to update data. - $this->asset_data_registry->add( 'needsRefreshForInteractivityAPI', true ); + $this->asset_data_registry->add( 'needsRefreshForInteractivityAPI', true, true ); } /** diff --git a/plugins/woocommerce/src/Blocks/BlockTypes/ProductQuery.php b/plugins/woocommerce/src/Blocks/BlockTypes/ProductQuery.php index 71ecaec1c52..351dc22f439 100644 --- a/plugins/woocommerce/src/Blocks/BlockTypes/ProductQuery.php +++ b/plugins/woocommerce/src/Blocks/BlockTypes/ProductQuery.php @@ -180,6 +180,7 @@ class ProductQuery extends AbstractBlock { // and needs refresh to update data. $this->asset_data_registry->add( 'needsRefreshForInteractivityAPI', + true, true ); // Set this so that our product filters can detect if it's a PHP template.