Commit cccf440780 for woocommerce
commit cccf4407807b02a7d19a4929dfa3df138f5d34c1
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date: Sun Jan 25 18:13:38 2026 +0100
Avoid Coupon Code block trying to fetch an nonexistent stylesheet (#62935)
* Avoid Coupon Code trying to fetch an unexisting stylesheet
* Add changelog file
* Update changelog file
diff --git a/plugins/woocommerce/changelog/fix-404-error-site-editor-coupon-code-css b/plugins/woocommerce/changelog/fix-404-error-site-editor-coupon-code-css
new file mode 100644
index 0000000000..df1c3fd754
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-404-error-site-editor-coupon-code-css
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Avoid Coupon Code trying to fetch an nonexistent stylesheet
+
+
diff --git a/plugins/woocommerce/src/Blocks/BlockTypes/CouponCode.php b/plugins/woocommerce/src/Blocks/BlockTypes/CouponCode.php
index d8b2bc6d8f..243e559b4a 100644
--- a/plugins/woocommerce/src/Blocks/BlockTypes/CouponCode.php
+++ b/plugins/woocommerce/src/Blocks/BlockTypes/CouponCode.php
@@ -56,6 +56,15 @@ class CouponCode extends AbstractBlock {
return null === $key ? $script : ( $script[ $key ] ?? null );
}
+ /**
+ * Get the frontend style handle for this block type.
+ *
+ * @return null
+ */
+ protected function get_block_type_style() {
+ return null;
+ }
+
/**
* Render the coupon code block.
*