0

How do I show a user's first name in the WooCommerce emails instead of their username?

I just want to replace the username with the first name of the user. I want to add a small line before the email content and that line or phrase is "Hello [user's first name],".

Any help will be highly appreciated.

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
Husnain Abbas
  • 159
  • 1
  • 1
  • 10

1 Answers1

1

You should be able to show thefirstname using the following shortcode:

{customer_first_name}

See the WooCommerce page for email variables.

Phill Healey
  • 3,084
  • 2
  • 33
  • 67
  • Is this possible to copy woocommerce email templates in a custom plugin and edit it. By default, the email starts from Hi {username} which I want to change to Hi {first_name} by copy into custom plugin – Hannah James Dec 02 '20 at 15:56
  • @HannahJames it shoul do as long as the emails are still processed via WooCommerce – Phill Healey Dec 02 '20 at 21:43