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
This commit is contained in:
Albert Juhé Lluveras 2024-09-02 09:40:47 +02:00 committed by GitHub
parent 2433664aa8
commit 0f7773dd47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix My Account block icon being too small when inserted via block hooks

View File

@ -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.