Commit e50b5d8a93 for woocommerce
commit e50b5d8a9313a841f877eb85ae95e89d597b11da
Author: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
Date: Thu Nov 27 15:20:56 2025 +0100
Allow inserting more blocks inside Product Gallery Large Image (#62030)
* Allow inserting blocks to large image
* Add changelog
* Add z-index: 1 to Large Image inner blocks
* Handle Next Prev Buttons pointer events with new z-index property
diff --git a/plugins/woocommerce/changelog/wooplug-5820-enhancement-product-gallery-permit-to-add-block-beforeafter b/plugins/woocommerce/changelog/wooplug-5820-enhancement-product-gallery-permit-to-add-block-beforeafter
new file mode 100644
index 0000000000..355dc43f08
--- /dev/null
+++ b/plugins/woocommerce/changelog/wooplug-5820-enhancement-product-gallery-permit-to-add-block-beforeafter
@@ -0,0 +1,4 @@
+Significance: patch
+Type: add
+
+Product Gallery Large Image: allow inserting other blocks
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-gallery/inner-blocks/product-gallery-large-image/block.json b/plugins/woocommerce/client/blocks/assets/js/blocks/product-gallery/inner-blocks/product-gallery-large-image/block.json
index ded62f991a..be6f0e80c5 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-gallery/inner-blocks/product-gallery-large-image/block.json
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-gallery/inner-blocks/product-gallery-large-image/block.json
@@ -10,11 +10,6 @@
"supports": {
"interactivity": true
},
- "allowedBlocks": [
- "woocommerce/product-image",
- "woocommerce/product-sale-badge",
- "woocommerce/product-gallery-large-image-next-previous"
- ],
"textdomain": "woocommerce",
"ancestor": [ "woocommerce/product-gallery" ],
"viewScriptModule": "woocommerce/product-gallery-large-image",
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/product-gallery/style.scss b/plugins/woocommerce/client/blocks/assets/js/blocks/product-gallery/style.scss
index 8f9bb5b535..fc7f23be4b 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/product-gallery/style.scss
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/product-gallery/style.scss
@@ -85,6 +85,7 @@ $dialog-padding: 20px;
> * {
margin-left: unset;
margin-right: unset;
+ z-index: 1;
}
}
@@ -94,6 +95,11 @@ $dialog-padding: 20px;
justify-content: space-between;
width: 100%;
height: 100%;
+ pointer-events: none;
+
+ :where(.wc-block-next-previous-buttons__button) {
+ pointer-events: all;
+ }
&:where(.alignleft) {
justify-content: flex-start;