Change fileds in email template
-
Hello,
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 detailsdo_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 loops 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
I know that I can hack into those actions with filters but I don’t want to change the order of the fields on every email template, just on a couple of them. Is there a way to display each field from Customer Details and Billing Address manually?
- The topic ‘Change fileds in email template’ is closed to new replies.