Not a duplicate of Display order total with and without VAT in Woocommerce's order email notification.
How can I customize the subject of the E-mail, (not the body. I know how to edit the variables in the body, but the same variables don't work in the subject for some reason).
So I am trying to change the subject of WooCommerce order email notifications.
The subject is customizable via WooCommerce -> Settings -> E-mails -> New Order -> Manage… and according to WooCommerce documentation, there are variables such as {order_date}
, {customer_name}
, etc... that can be use to get dynamic order data.
My problem is that I would like to show the "order number" and the "order total" in the subject:
- If I use the format:
Order {order_number} - {order_date} - {dollars_spent_order}
- I should get:
Order # 123456 - July 6, 2018 - {dollars_spent_order}
But it doesn't work. Using single or double curly-braces makes no difference.
How can I add the order total (including tax, shipping, etc) to the E-mail subject line?
I would like to get the following result:
Order # 123456 - July 6, 2018 - $ 1,234.56
I Googled this, but didn't find any code snippets that show me how to do this.
There's also a "WooCommerce Follow-Ups" extension that adds more variables, but it's $ 99.00 and I don't need all those, just the order total. There's GOT to be a code snippet somewhere...