Commit 3ff7e0a00bb for woocommerce
commit 3ff7e0a00bb3de4c2b1a00646d81a36c54b06965
Author: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
Date: Tue Oct 6 08:41:10 2026 +0200
Add more styling options to the Single Product block (#69398)
* Add styling and List View supports to the Single Product block
* Add changelog entry for Single Product block supports
* Remove added Single Product support tests
* Revert unnecessary Single Product deprecation change
* Add shadow support to the Single Product block
* Update changelog entry for Single Product shadow support
diff --git a/docs/block-development/reference/block-references.md b/docs/block-development/reference/block-references.md
index f13c8ef924f..ee3f2438804 100644
--- a/docs/block-development/reference/block-references.md
+++ b/docs/block-development/reference/block-references.md
@@ -1622,7 +1622,7 @@ Display a single product of your choice with full control over its presentation.
- **Name:** woocommerce/single-product
- **Category:** woocommerce
-- **Supports:** align (full, wide), interactivity
+- **Supports:** align (full, wide), color (background, gradients, ~~text~~), interactivity, listView, shadow, spacing (margin, padding)
- **Attributes:** productId
## Filter by Stock Controls - woocommerce/stock-filter
diff --git a/plugins/woocommerce/changelog/add-single-product-block-supports b/plugins/woocommerce/changelog/add-single-product-block-supports
new file mode 100644
index 00000000000..989ff5b3343
--- /dev/null
+++ b/plugins/woocommerce/changelog/add-single-product-block-supports
@@ -0,0 +1,4 @@
+Significance: minor
+Type: enhancement
+
+Add spacing, background, border, shadow, and List View controls to the Product block.
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/single-product/block.json b/plugins/woocommerce/client/blocks/assets/js/blocks/single-product/block.json
index 070f1e32933..3598a4c25b0 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/single-product/block.json
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/single-product/block.json
@@ -7,7 +7,27 @@
"keywords": [ "WooCommerce", "single product" ],
"supports": {
"interactivity": true,
- "align": [ "wide", "full" ]
+ "align": [ "wide", "full" ],
+ "color": {
+ "background": true,
+ "gradients": true,
+ "text": false,
+ "__experimentalDefaultControls": {
+ "background": true
+ }
+ },
+ "spacing": {
+ "padding": true,
+ "margin": [ "top", "bottom" ]
+ },
+ "__experimentalBorder": {
+ "color": true,
+ "style": true,
+ "width": true,
+ "radius": true
+ },
+ "listView": true,
+ "shadow": true
},
"attributes": {
"productId": {
@@ -16,6 +36,7 @@
},
"example": {},
"usesContext": [ "postId", "postType", "queryId" ],
+ "style": "file:../woocommerce/single-product-style.css",
"textdomain": "woocommerce",
"apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json"
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/single-product/style.scss b/plugins/woocommerce/client/blocks/assets/js/blocks/single-product/style.scss
new file mode 100644
index 00000000000..813c53bb09f
--- /dev/null
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/single-product/style.scss
@@ -0,0 +1,3 @@
+.wp-block-woocommerce-single-product {
+ box-sizing: border-box;
+}