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()}}
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityHow 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()}}
As mentioned in comments you can use getCustomerFirstname().
{{trans "Hi %first_name," first_name=$order.getCustomerFirstname()}}