The WooCommerce Email Settings allow you to add custom recipients only for New Order, Cancelled Order, Failed Order and all admin-only emails.
But what if you want to add an email recipient to a customer email e.g. the Completed Order one? For example, you need to send it to your dropshipper. Also, you might want to add a To: recipient, or instead a cleaner Cc: or safer Bcc:.
Either way, a simple snippet allows you to achieve that (and more, if you consider WooCommerce conditional logic). Enjoy!
WooCommerce emails come with the following hard-coded (argh!) greetings: ‘Thanks for shopping with us.‘, ‘Thanks for reading.‘, ‘We look forward to seeing you soon.‘, ‘We look forward to fulfilling your order soon.‘, ‘Thanks!‘, ‘We hope to see you again soon.‘ based on the specific email.
While having these greetings in the WooCommerce customer email footer may look nice and friendly, it is unlike WooCommerce to present them without the possibility to “filter” them out (i.e. removing them if you don’t want them).
This snippet consists of many WooCommerce tasks: setting up a “WordPress Cron Job” (i.e. schedule a hook that runs on a specific time interval), getting the WooCommerce completed orders from the database, and finally sending a simple email to the store admin.
If you use custom WooCommerce order statuses, or wish to target an order status transition that is not default (e.g. when order goes from “Processing” to “Completed”, the Completed email triggers – but what if you want to target a transition from “Processing” to “Custom Status”?), sending custom emails is quite complex.
First of all, they won’t show under WooCommerce > Settings > Emails (unless you code it, true) – second, no email will trigger. So, how do they do it?
There are times when you sell free products to give customers access to a membership, an online course, or for other reasons. In this cases, you might not want to send them the “Order Completed” email, as the follow-up work is done by your email marketing software or they are automatically redirected to the resource upon checkout.
Of course, you definitely want to keep the “Order Completed” emails for orders that are not $0. Unfortunately, the method suggested by WooCommerce which “unhooks the emails” cannot be used together with a conditional check (in our case we need to verify if the Order total is $0), so a workaround is needed. Here’s the fix.
There is a slightly annoying thing on the WooCommerce Thank-You Page and WooCommerce emails. Users looking at the order table can actually click on the Products they just purchased and abandon the page before taking the action you want them to take (see image below).
WooCommerce Customizers: the Visual Hook Guide is back 🙂
Here’s a visual HTML hook guide for the WooCommerce Emails. This visual guide belongs to my “Visual Hook Guide Series“, that I’ve put together so that you can find WooCommerce hooks quickly and easily by seeing their actual locations.
Let me know in the comments if this resource it’s helpful and how! Enjoy 🙂
Today we take a look at the WooCommerce Emails and specifically at how to change the subject of the Customer Processing Order email by adding the billing “First Name”. As usual, this is a matter of 3 lines of PHP code – feel free to copy/paste and customize it to your liking 🙂
If you wish to print the payment gateway name on order emails (in its own paragraph below the order items table), here’s a handy snippet for you.
All you need to use is the “woocommerce_email_after_order_table” hook to pick the correct position, and then the “get_payment_method_title” WooCommerce function to return the payment gateway name. Enjoy!
A client of mine asked me to add some additional text to the thank you page and the customer order email. In both cases, my client wanted to show an immediate upsell to get buyers to go back to the website and buy again with a coupon code.