I want to build a custom email template for the emails that are sent to customers when an order is placed. I will refer to
customer-processing-order.php file. In it, there are two actions that display order details
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); and customer details
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );.
Digging deeper I see that in
email-customer-details.php there is a foreach loop that outputs the contents of this function
echo wp_kses_post( $field['value']. In
email-addresses.php the address is displayed using this function
<?php echo $order->get_formatted_billing_address(); ?>.
What I would like to do is to build an email template with each field parsed manually. How can I output the content of the functions above on a field by field basis? I want to mix fields in between them do display something like
Customer Name Customer Address Customer Phone Custom checkout fields that I built Customer shipping address
Is there a way to display each field from Customer Details and Billing Address manually?