0

How can we load the customer first name in transactional emails in Magento 2.3?

We tried this, but that does not work;

{{trans "%name," name=$order.getBillingAddress().getFirstName()}}
2
  • 1
    try getFirstname Apr 9, 2020 at 10:08
  • try {{var order.getCustomerFirstname()}} Apr 9, 2020 at 11:48

1 Answer 1

1

As mentioned in comments you can use getCustomerFirstname().

{{trans "Hi %first_name," first_name=$order.getCustomerFirstname()}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.