From 207a5b43d239d35255627337f793c30858f846de Mon Sep 17 00:00:00 2001 From: Alexandre Lara Date: Mon, 25 Mar 2024 10:59:57 -0300 Subject: [PATCH] Single Product Block: Add missing allowed inner blocks to fix nesting placement restrictions (#45530) * Add missing allowed inner blocks to Single Product block * Add changefile(s) from automation for the following project(s): woocommerce-blocks * Remove unnecessary attribute from Single Product block template --------- Co-authored-by: github-actions --- .../assets/js/blocks/single-product/constants.tsx | 4 ++++ ...28-single-product-block-restricting-inner-blocks-placement | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 plugins/woocommerce/changelog/45530-fix-45528-single-product-block-restricting-inner-blocks-placement diff --git a/plugins/woocommerce-blocks/assets/js/blocks/single-product/constants.tsx b/plugins/woocommerce-blocks/assets/js/blocks/single-product/constants.tsx index 323b185192f..86a5e1808fc 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/single-product/constants.tsx +++ b/plugins/woocommerce-blocks/assets/js/blocks/single-product/constants.tsx @@ -78,5 +78,9 @@ export const DEFAULT_INNER_BLOCKS: InnerBlockTemplate[] = [ export const ALLOWED_INNER_BLOCKS = [ 'core/columns', 'core/column', + 'core/post-title', + 'core/post-excerpt', + 'woocommerce/add-to-cart-form', + 'woocommerce/product-meta', ...Object.keys( getBlockMap( metadata.name ) ), ]; diff --git a/plugins/woocommerce/changelog/45530-fix-45528-single-product-block-restricting-inner-blocks-placement b/plugins/woocommerce/changelog/45530-fix-45528-single-product-block-restricting-inner-blocks-placement new file mode 100644 index 00000000000..8cf88ded567 --- /dev/null +++ b/plugins/woocommerce/changelog/45530-fix-45528-single-product-block-restricting-inner-blocks-placement @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix issue preventing some blocks from being direct children of the Single Product block. \ No newline at end of file