From 0f7773dd47df90e4c7c4e60c141b307e139202cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Mon, 2 Sep 2024 09:40:47 +0200 Subject: [PATCH] Fix My Account block icon being too small when inserted via block hooks (#51047) * Fix My Account block icon being too small when inserted via block hooks * Add changelog file --- .../woocommerce/changelog/fix-50667-my-account-hooked-size | 4 ++++ plugins/woocommerce/src/Blocks/BlockTypes/CustomerAccount.php | 1 + 2 files changed, 5 insertions(+) create mode 100644 plugins/woocommerce/changelog/fix-50667-my-account-hooked-size diff --git a/plugins/woocommerce/changelog/fix-50667-my-account-hooked-size b/plugins/woocommerce/changelog/fix-50667-my-account-hooked-size new file mode 100644 index 00000000000..4fcd396ddc4 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-50667-my-account-hooked-size @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix My Account block icon being too small when inserted via block hooks diff --git a/plugins/woocommerce/src/Blocks/BlockTypes/CustomerAccount.php b/plugins/woocommerce/src/Blocks/BlockTypes/CustomerAccount.php index 80bd799b224..8d201c1051f 100644 --- a/plugins/woocommerce/src/Blocks/BlockTypes/CustomerAccount.php +++ b/plugins/woocommerce/src/Blocks/BlockTypes/CustomerAccount.php @@ -68,6 +68,7 @@ class CustomerAccount extends AbstractBlock { public function modify_hooked_block_attributes( $parsed_hooked_block, $hooked_block_type, $relative_position, $parsed_anchor_block, $context ) { $parsed_hooked_block['attrs']['displayStyle'] = 'icon_only'; $parsed_hooked_block['attrs']['iconStyle'] = 'line'; + $parsed_hooked_block['attrs']['iconClass'] = 'wc-block-customer-account__account-icon'; /* * The Mini Cart block (which is hooked into the header) has a margin of 0.5em on the left side.