@maryhlumilina ・ Mar 15,2023 ・ 3 min read ・ Originally posted on mailtrap.io
Transactional emails are emails that are triggered when a user takes a specific action.
For example, when you forget your super difficult password (mydogmax111) for the 100th time and request a reset, you’ll receive an email with a password reset link. That would be a transactional email.
Such emails are important as they provide users with necessary information about further steps, confirm their action, or let them know if something was unsuccessful. Refer to this article to learn more about WordPress transactional emails.
By default, WooCommerce includes certain types of transactional emails that can be modified to match your needs. These are usually WooCommerce order emails:
These templates are available in plain text, HTML, or multipart formats. You can use them as they are or change their color or banner image. For that, you’d need to access WooCommerce email settings and scroll down to the 'Email template' section.
It’s also possible to change a particular template, for example, processing order. Simply press the ‘Manage’ button across the template. Fill in the empty fields, such as email subject, heading, additional content, and choose the email type (text, HTML, or multipart). Finally, hit ‘Save changes’.
If that’s not enough and you need more tweaks, just copy the template file below those fields by pressing ‘Copy file to theme’.
Navigate to the ‘Appearance’ tab in the WordPress dashboard and choose ‘Theme file editor’. You’ll see the ‘Theme files’ tab on the right portion of the screen. Scroll down to find ‘WooCommerce’. Expand it and press ‘emails’ which will open the menu with the list of templates you copied.
Choose the template you want to tweak and start coding.
Note: it’s recommended to create a child theme and make changes there to avoid losing all the customizations in the parent theme.
WooCommerce’s default customization options are limited, but there are multiple plugins that can help with that (more on that below).
Though plugins enable you to customize the design, you still have to come up with the content yourself or use templates. Here’s an order confirmation template from Mailtrap:
Subject: Your [SERVICE] order confirmation
Your order is confirmed!
[NAME], thanks for shopping with us. Here are your order details:
[product + picture]
[price_paid + payment method] // if payment by card, the last four digits should be used
[shipping + billing address]
We estimate that your order will arrive in 2-3 business days. Click the button below to track it.
TRACK YOUR ORDER
Forgot to add something? Here are the items our clients frequently buy together with [PRODUCT]. Get them within the next 24 hours, and we’ll ship everything together.
Need any support? Send a reply to this message or contact us right away [link].
Thanks for your order and we hope you enjoy!
The easiest way to test email sending in WooCommerce is to send a test email with WP Mail SMTP. Once the SMTP connection is established, you should navigate to the ‘Email Test’ tab, enter your email address, and toggle the HTML switch on or off. Press ‘Send’ and you’ll find the email in your mailbox within minutes.
If the authentication was unsuccessful or some other error occurred, you’ll see the notification immediately.
Another option is to create a sample order in your WooCommerce store. Don’t worry, you won’t send email to customer and scare them off.
What you have to do here is go to WooCommerce > Settings > Emails tab. Choose either ‘New order’, ‘Canceled order’, or ‘Failed order’ templates. These three templates can be addressed to you.
Click ‘Manage’ and enter your email address. Make sure ‘Enable this email notification’ is toggled on. Now go to the ‘Orders’ section and hit ‘New Order’. You don’t have to fill in anything here. Just pay attention to the ‘Customer’ field – it should indicate ‘Guest’.
Find the ‘Order Actions’ tab and choose ‘Resend new order notification’ from the dropdown menu. Press ‘Create’ and you’ll receive an order notification. While you’re at it, you could also check your template visually.
To read more about different plugins to send emails via WooCommerce, follow the link with the original guide by Ketevan Bostoganashvili, Mailtrap.
Join other developers and claim your FAUN account now!
Only registered users can post comments. Please, login or signup.