0

In Woocommerce, I am trying to send customized email notifications to my customers and I need to get the customer information like First name, E-Mail address, Last name … etc.

Where can I get customer information for email templates?

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
Chris Code
  • 49
  • 5

1 Answers1

0

I mostly on all related email Woocommerce templates, you can use the WC_Order Object $order variable. So from this WC_Order Object you can use the following:

Then you can get all details using available WC_Order methods this way:

$first_name = $order->get_billing_first_name(); // First name
$Last_name  = $order->get_billing_last_name(); // Last name
$email      = $order->get_billing_email(); // Email address

For other user needed details see: How to get WooCommerce order details

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399