Commit 869b030d322 for woocommerce

commit 869b030d3225bd44f103cb2ba33a9707d1f324a9
Author: Filipe Varela <keoshi@keoshi.com>
Date:   Tue Oct 6 17:51:43 2026 +0100

    Let themes size the Order Confirmation section headings (#67743)

    * Let themes size the Order Confirmation headings

    The five Order Confirmation section headings hardcoded font-size 24px.
    WordPress fluid typography rewrites that to a clamp with a floor of
    around 65%, which on narrow screens lands below the theme's own body
    size: 16.35px against 16.8px body in Twenty Twenty-Four, and 16.31px
    against 18.27px in Twenty Twenty-Five.

    Remove the size so each theme styles its own h2. This restores the
    hierarchy by construction, since a theme sizes headings against its own
    body text, and brings these headings back in line with the contributor
    guidelines, which require theme-relative sizing so blocks fit different
    themes. They were the only hardcoded pixel font size left in any
    shop-facing template or pattern.

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

    * Add changelog entry for Order Confirmation heading sizes

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

    * Update plugins/woocommerce/changelog/fix-50587-order-confirmation-heading-sizes

    ---------

    Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
    Co-authored-by: Raluca Stan <ralucastn@gmail.com>

diff --git a/plugins/woocommerce/changelog/fix-50587-order-confirmation-heading-sizes b/plugins/woocommerce/changelog/fix-50587-order-confirmation-heading-sizes
new file mode 100644
index 00000000000..4c6ba963ecd
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-50587-order-confirmation-heading-sizes
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Order Confirmation section headings now use the theme's heading size instead of a fixed 24px
diff --git a/plugins/woocommerce/src/Blocks/BlockTypesController.php b/plugins/woocommerce/src/Blocks/BlockTypesController.php
index 9db33000532..a99f607688c 100644
--- a/plugins/woocommerce/src/Blocks/BlockTypesController.php
+++ b/plugins/woocommerce/src/Blocks/BlockTypesController.php
@@ -273,7 +273,7 @@ final class BlockTypesController {
 			array(
 				'title'    => '',
 				'inserter' => false,
-				'content'  => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Order details', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
+				'content'  => '<!-- wp:heading {"level":2} --><h2 class="wp-block-heading">' . esc_html__( 'Order details', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
 			)
 		);
 		register_block_pattern(
@@ -281,7 +281,7 @@ final class BlockTypesController {
 			array(
 				'title'    => '',
 				'inserter' => false,
-				'content'  => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Downloads', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
+				'content'  => '<!-- wp:heading {"level":2} --><h2 class="wp-block-heading">' . esc_html__( 'Downloads', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
 			)
 		);
 		register_block_pattern(
@@ -289,7 +289,7 @@ final class BlockTypesController {
 			array(
 				'title'    => '',
 				'inserter' => false,
-				'content'  => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Shipping address', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
+				'content'  => '<!-- wp:heading {"level":2} --><h2 class="wp-block-heading">' . esc_html__( 'Shipping address', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
 			)
 		);
 		register_block_pattern(
@@ -297,7 +297,7 @@ final class BlockTypesController {
 			array(
 				'title'    => '',
 				'inserter' => false,
-				'content'  => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Billing address', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
+				'content'  => '<!-- wp:heading {"level":2} --><h2 class="wp-block-heading">' . esc_html__( 'Billing address', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
 			)
 		);
 		register_block_pattern(
@@ -305,7 +305,7 @@ final class BlockTypesController {
 			array(
 				'title'    => '',
 				'inserter' => false,
-				'content'  => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Additional information', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
+				'content'  => '<!-- wp:heading {"level":2} --><h2 class="wp-block-heading">' . esc_html__( 'Additional information', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
 			)
 		);
 		// Referenced from the default Cart page content created at install; registration must not depend on the Cart block type being enabled, or the page renders nothing for the reference.