diff --git a/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/BlockRegistry.php b/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/BlockRegistry.php index 967dc42b559..e75da2cf4ca 100644 --- a/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/BlockRegistry.php +++ b/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/BlockRegistry.php @@ -200,8 +200,8 @@ class BlockRegistry { return register_block_type_from_metadata( $block_json_file, [ - 'attributes' => $this->augment_attributes( $metadata['attributes'] ), - 'uses_context' => $this->augment_uses_context( $metadata['usesContext'] ), + 'attributes' => $this->augment_attributes( isset( $metadata['attributes'] ) ? $metadata['attributes'] : [] ), + 'uses_context' => $this->augment_uses_context( isset( $metadata['usesContext'] ) ? $metadata['usesContext'] : [] ), ] ); }