How to Change Email Template in WooCommerce

Change Email Template in WooCommerceAre 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:

  1. 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.
  2. 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/.
  3. 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:
[php] $credit = "

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

  1. WooCommerce Redirect After Checkout : Redirect to Custom Thank You Page

Comments are closed.