Commit 4642401bb57 for woocommerce

commit 4642401bb576f3d87aca5419e890fe8097d0cf3a
Author: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
Date:   Mon Mar 30 15:26:03 2026 +0200

    Prevent margins on empty Store Notices (#63749)

    * Don't render empty store notices

    * Add changelog

    * Use wp_strip_all_tags for empty notices check instead of string comparison

    Replaces brittle exact HTML string match with a more resilient
    check that strips tags and trims whitespace to detect empty content.

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

    * Update the approach

    ---------

    Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

diff --git a/plugins/woocommerce/changelog/fix-dont-render-empty-store-notices b/plugins/woocommerce/changelog/fix-dont-render-empty-store-notices
new file mode 100644
index 00000000000..db61c4937d4
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-dont-render-empty-store-notices
@@ -0,0 +1,4 @@
+Significance: minor
+Type: fix
+
+Store Notices: Remove margins from empty Store Notices container
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/store-notices/index.tsx b/plugins/woocommerce/client/blocks/assets/js/blocks/store-notices/index.tsx
index b83b17bf6af..0fd0be1eb50 100644
--- a/plugins/woocommerce/client/blocks/assets/js/blocks/store-notices/index.tsx
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/store-notices/index.tsx
@@ -10,6 +10,7 @@ import { totals } from '@woocommerce/icons';
  */
 import metadata from './block.json';
 import edit from './edit';
+import './style.scss';

 registerBlockType( metadata, {
 	icon: {
diff --git a/plugins/woocommerce/client/blocks/assets/js/blocks/store-notices/style.scss b/plugins/woocommerce/client/blocks/assets/js/blocks/store-notices/style.scss
new file mode 100644
index 00000000000..4cc65f0ee9f
--- /dev/null
+++ b/plugins/woocommerce/client/blocks/assets/js/blocks/store-notices/style.scss
@@ -0,0 +1,4 @@
+.wc-block-store-notices:has(> .woocommerce-notices-wrapper:only-child:empty) {
+	margin-block-start: 0;
+	margin-block-end: 0;
+}