Commit b8c07cc2e92 for woocommerce
commit b8c07cc2e9223914807d64d670db659a88d19da2
Author: Ann <annchichi@users.noreply.github.com>
Date: Tue Aug 18 17:14:02 2026 +0800
[Email Editor] Fix locale-sensitive pill padding (#67790)
* Fix locale-sensitive social link pill padding
* Add changelog entry for locale-safe pill padding
* Verify comma decimal locale in social links test
* Remove skipped locale-specific social links test
diff --git a/packages/php/email-editor/changelog/fix-pill-shape-padding-locale b/packages/php/email-editor/changelog/fix-pill-shape-padding-locale
new file mode 100644
index 00000000000..0767b499f49
--- /dev/null
+++ b/packages/php/email-editor/changelog/fix-pill-shape-padding-locale
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Ensure pill-shaped social link padding uses locale-independent decimal formatting in rendered emails.
diff --git a/packages/php/email-editor/src/Integrations/Core/Renderer/Blocks/class-social-links.php b/packages/php/email-editor/src/Integrations/Core/Renderer/Blocks/class-social-links.php
index f6ad80c5869..e65ff15316e 100644
--- a/packages/php/email-editor/src/Integrations/Core/Renderer/Blocks/class-social-links.php
+++ b/packages/php/email-editor/src/Integrations/Core/Renderer/Blocks/class-social-links.php
@@ -168,7 +168,7 @@ class Social_Links extends Abstract_Block_Renderer {
);
if ( $is_pill_shape ) {
- $pill_shape_horizontal_padding = round( $font_size_value * 2 / 3, 2 ) . 'px';
+ $pill_shape_horizontal_padding = rtrim( rtrim( number_format( $font_size_value * 2 / 3, 2, '.', '' ), '0' ), '.' ) . 'px';
$row_container_styles['padding-left'] = $pill_shape_horizontal_padding;
$row_container_styles['padding-right'] = $pill_shape_horizontal_padding;
}