Are you looking for a way to override the WooCommerce email template? WooCommerce is packed with many features that allow you to sell anything online. WooCommerce allows you to send emails to your customers to inform them about their order statuses.
These emails are sent to customers in response to their interactions with the store.
You may want to customize the email by override the custom email template. However, this may be complex for some people.
This is why we decided to create a tutorial on how you can override this template.
How to Change Email Template in WooCommerce
By the end of this post, you should be able to override the email template in WooCommerce. We will show you how to copy the template and add custom code to override the template.
For illustration purposes, we will add some helpful payment instructions to the email, based on the checkout payment type used.
Let us see how you can achieve this.
Steps to Change Email Template in WooCommerce
Overriding the email template is the most effective and efficient approach to modify the default email layouts.
WooCommerce includes a powerful template system that allows you to customize parts of your store or emails. This is done by replicating the format file(s) into the theme.
Each email has its own template for its content. An example is the customer-process-order.php template.
It is also important to note that there are shared templates that all email types can access and use. It can be located under woocommerce/templates/emails/email-styles.php.
This template that developers override to change shared aspects of the emails.
For illustration purposes, we will deal with the footer.
Here are the steps you need to follow:
- The first thing you need to do is to ensure that the following directory exists in the WordPress installation: wp-content/themes/your-theme/woocommerce/emails.
- After that, copy the file found at wp-content/plugins/woocommerce/templates/emails/email-styles.php into the store’s theme at: your-theme/woocommerce/emails/.
- The last step is to edit your-theme/woocommerce/emails/email-styles.php to change the footer text color to black. We will only show the relevant part of the template file code:
color: #66bae3;
font-size:15px;
text-align:center;
";
[/php]
This code allows you to modify the footer.
Conclusion
Customizing the default email templates becomes tricky sometimes. By now, you should be able to change the email template in your WooCommerce store. However, if you encounter any problems, please consider contacting a qualified WordPress developer
Similar Articles
- WooCommerce Redirect After Logout [Ultimate Guide]
- 100+ Tips, Tricks & Snippets Ultimate WooCommerce Hide Guide
- WooCommerce Redirect After Checkout : Redirect to Custom Thank You Page
- 30+ Best Instagram Plugins to Grow Your Traffic & Social Connections
- 30+ Best WordPress Inventory Management Plugins
- How to Change Add to Cart Button to Read More WooCommerce
- How to Change Email Sender In WooCommerce
- How to Keep WooCommerce Description Tab Open by Default
- How to Create WooCommerce Custom Shop Page
- WooCommerce Checkout Optimization Quick Guide
- How to Add WooCommerce Invoice Checkout Page
- How to Add View Cart Button In WooCommerce
- How to Add Custom Add to Cart Button In WooCommerce
- How to Send Email on Status Change In WooCommerce
- How to Force Secure Checkout In WooCommerce
- How to Adjust WooCommerce Storefront Height of Header
- How to Change Currency Symbol In WooCommerce
- How to Customize WooCommerce Product Pages
- How to Add Wishlist In WooCommerce
- How to Change Number of Related Products Per Row WooCommerce
Comments are closed.