0

How to get account_id custom customer attribute in customer welcome email template in magento 2.3.5-p2

This link already try but not working access custom customer attribute in email template

 The variable "customer" contains the following information:
            ...
            [email] => doe@example.com
            [firstname] => John
            [lastname] => Doe
            [prefix] => Mr.
            [gender] => 0
            [store_id] => 1
            [website_id] => 1
            [addresses] => Array
                (
                )

            [disable_auto_group_change] => 0
            [custom_attributes] => Array
                (
                    [0] => Array
                        (
                            [attribute_code] => account_id
                            [value] => 1234
                        )

                )

            [name] => John Doe
        )

PackageName/Vendor/view/frontend/templates/customer/email.html

<?php $customer = $block->getCustomer(); ?>

This code is not working

Advance thanks For help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.