I'm new to WooCommerce and I have had a request to make a minor change to the new order email which I have managed to find the template, but I am not sure which line I should change.
At the moment the new order email has:
You have received an order from (billing address first name)
But I want to change it to:
You have received an order from (username which made the order)
Is this possible? Would this just change the variable the email is using?
Thanks in advance.
I'm new to WooCommerce and I have had a request to make a minor change to the new order email which I have managed to find the template, but I am not sure which line I should change.
At the moment the new order email has:
You have received an order from (billing address first name)
But I want to change it to:
You have received an order from (username which made the order)
Is this possible? Would this just change the variable the email is using?
Thanks in advance.
Share Improve this question edited Jan 7, 2018 at 1:05 Ciprian 8792 gold badges11 silver badges27 bronze badges asked Jan 6, 2018 at 11:21 WoohelpWoohelp 311 silver badge3 bronze badges2 Answers
Reset to default 2I have found the line I need to edit I think
<p><?php printf( __( 'You have received an order from %s. The order is as follows:', 'woocommerce' ), $order->get_formatted_billing_full_name() ); ?></p>
would that change to
<p><?php printf( __( 'You have received an order from %s. The order is as follows:', 'woocommerce' ), $order->get_user() ); ?></p>
Yes, it's possible.
Copy the email folder from the plugin directory to a woocommerce folder in your child-theme.
/wp-content/plugins/woocommerce/template/emails/admin-new-order.php
gets copied to
/wp-content/themes/your-theme/woocommerce/emails/admin-new-order.php
Then you can change the email template to suit your needs.