This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

✨ Vultr and Linode are back on Cloudways! VIEW PLANS→

How to Customize Order Emails in WooCommerce (2 Methods)

Updated on February 29, 2024

10 Min Read
customize woocommerce order emails

When managing a WooCommerce store, automatic emails allow you to receive and send customers queries/information by minimizing manual interventions and often repetitive procedures that sometimes would require a lot of effort.

These default emails are sent when specific events occur. For example, an order being processed, a refund, or the reset of a password. In the case of WooCommerce, these operations are simplified by features specifically dedicated to email automation and customer processing.

In this article, I’ll tell you why you should customize WooCommerce emails and how you can do it easily.

Why Should You Customize Your Emails?

Emails are a fundamental part of any WooCommerce store. Several studies have been conducted that suggest personalized emails can drive more engagement and revenue. It can also increase your open, click-through, and reply rates. Besides, your personalized emails won’t sound spammy to your customers.

Customizing WooCommerce emails helps you build trust among your customers, who are more likely to interact with your online store from time to time. Since personalizing them while taking care of your brand’s style, color, tone, and shape are important, there are a few things that you should consider while customizing WooCommerce emails.

  • Name
  • Subject line
  • Time period
  • Relevancy
  • Order

Types of WooCommerce Order Status

WooCommerce includes several order statuses that may not match the flows of your store, but still, you can mark orders with custom statuses, such as Payment Pending, Processing, On Hold, Failed, etc.

Many WooCommerce store owners have this common query: How can I customize the default WooCommerce request messages for a personalized look and feel? How can I add additional content to help clients with their orders and create a custom WooCommerce order status?

While making impressive HTML emails is truly an achievement in itself, WooCommerce offers several options so that even amateurs can create some amazing emails.

Fastest WooCommerce Hosting for Stores Prioritizing Performance

Upgrade to Cloudways managed hosting and enjoy scalable infrastructure, advanced caching, and dedicated support. Take your WooCommerce store to new heights!

Types of WooCommerce Default Transactional Emails (With Code)

“Vanilla” offers WooCommerce email notifications that are sent to customers in response to their interactions with the store. The following are the most important emails for the customers of your WooCommerce store.

  • New Order: New order emails are sent when a new order is received.
  • Cancelled Order: Cancelled order emails are sent when order(s) has been marked as canceled.
  • Failed Order: Failed order emails are sent when an under-processing or on-hold order is marked as Fail.
  • Order On hold: This is an order notification sent to customers. It contains order details after an order is placed on hold.
  • Processing Order: This is an order notification sent to customers. It contains order details after payment.
  • Completed Order: Order complete emails are sent to customers when their orders are marked completed. These emails usually indicate that the orders have been shipped.
  • Refunded Order: Order refunded emails are sent to customers when their orders are marked refunded.
  • Customer Invoice: Customer invoice emails contain order information and payment links.
  • Customer Note: Customer note emails are sent when you add a note to an order.
  • Reset Password: Customer “reset password” emails are sent when customers reset their passwords.
  • New Account: Customer “new account” emails are sent to the customer when a customer signs up via checkout or account signup page.

In addition to these standard email types, you can also add customized emails.

WooCommerce Global Email Options

The standard WooCommerce email looks like this:

The WooCommerce admin allows some basic customization of this default email layout. These options could be accessed after logging in to the WordPress Admin and going to WooCommerce → Settings → Emails → Email  Sender Options. These options include:

  • Set the from name/address (visible to the customer)
  • WooCommerce email header image size
  • Change the email footer text
  • Choose a different base, background, and body text colors

WooCommerce Email Option

Here’s an example of a WooCoomerce order email.

WooCommerce Email Option

Remember that these choices apply to all emails. In just a matter of minutes, you can create a highly customized email by altering the WooCommerce email header image size, custom footer text, and another base color.

Email template

You might have noticed that WooCommerce identified that a bright base color was used. To compensate, it used a suitable shade for the title. Unfortunately, this logic was not applied to the footer’s content. This mishap can easily be fixed manually!

WooCommerce Email Specific Options

Every email type has its own set of customization options. These options can be accessed through WooCommerce → Settings → Emails → Processing order (This example path focuses on Processing Order Emails. You can alter several aspects of the email, including:

  • Enable or Disable whether the email is even sent at all
  • The email’s subject
  • Email heading (The default is “Thank you for your order”)
  • Whether the email is sent as HTML or plain text (The default option is HTML)

Processing Ordder

I have set the custom email heading here as ‘Thank You For Your Order.’

Processing Ordder

How to Customize WooCommerce Email Template

A more effective and efficient approach is to modify the default email layouts. WooCommerce offers a helpful template system that allows you to customize parts of your store or emails by replicating the format file(s) into the theme.

Every email type has a template file for its content.

For example:

woocommerce/templates/emails/customer-process-order.php.

In addition, there are shared templates that all email types can access and use. These could be found at  woocommerce/templates/emails/email-styles.php.

In many cases, this is the template that developers override to change shared aspects of the emails. The process of dealing with the footer issue mentioned earlier is:

  1. First, make sure that the following directory exists in the WordPress installation: wp-content/themes/your-theme/woocommerce/emails.
  2. Next, 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. Finally, edit your-theme/woocommerce/emails/email-styles.php to change the footer text color to black (for brevity, only the relevant part of the template file code is shown):
$credit = "
color: #66bae3;
font-size:15px;
text-align:center;
";

This generates a much more readable footer:

image05

Conditional Customization with Actions/Filters

The final and most effective approach to customizing emails is to work with WooCommerce custom code. This obviously requires a high level of expertise in PHP. The good news is that the process is straightforward because the original WooCommerce layouts are still in use. The process involves changing portions of the content.

Filter Functions

Actions Functions

Activation/Deactivation/Uninstall Functions

For this example, I will add some helpful payment instructions to the email based on the checkout payment type used.

To start, add the following to the theme’s functions.php:

add_action( 'woocommerce_before_email_order', 'add_order_instruction_email', 10, 2 );
 
function add_order_instruction_email( $order, $sent_to_admin ) {
  
  if ( ! $sent_to_admin ) {
 
    if ( 'cod' == $order->payment_method ) {
      // cash on delivery method
      echo '<p><strong>Instructions:</strong> Full payment is due immediately upon delivery: <em>cash only, no exceptions</em>.</p>';
    } else {
      // other methods (ie credit card)
      echo '<p><strong>Instructions:</strong> Please look for "Madrigal Electromotive GmbH" on your next credit card statement.</p>';
    }
  }
}

If the customer opted for “Cash on Delivery” when checking out, the customer would receive the email with helpful order instructions:

WooCommerce Checkout setting

Plugin/Payment Gateway Options

Several plugins and payment gateways actually allow you to customize parts of the order emails. For instance, the built-in bank/wire transfer payment method allows you to configure instructions and insert wire transfer information.

This could be done easily through  WooCommerce > Settings > Checkout > BACS.

WooCommerce Checkout setting

Although it’s uncommon, it is good to know that these options are available. This information could also help you opt for a particular plugin for the store.

WooCommerce Emails add_actions Hook

When working with WooCommerce emails, the add_actions hook often comes in handy. When working with this hook, you will need to use a global variable, email, that will contain the email subject. here is the code snippet:

add_action( 'woocommerce_email_header', 'woocommerce_emails_before_header', 1,3 );
function woocommerce_emails_before_header( $email_heading, $email ){
    $GLOBALS['email'] = $email;
}

The above hook can be placed in functions.php ( located in your theme folder) or at the start of the WooCommerce email template. the global variable $email calls the main WooCommerce email object, while $order contains an instance of the global WooCommerce order object.

global $email; 
$order = $email->object;

WooCommerce Custom Email Per Product

The following code sends a custom order email template for a different product. For example, for the product ID 87, you want to display the header title WooCommerce email notification OR how to test WooCommerce emails:

function woocommerce_custom_email_per_product_depending_on_product_id( $email_heading, $order ) {
    global $woocommerce;
    $items = $order->get_items();
    foreach ( $items as $item ) {
        $product_id = $item['product_id'];
        if ( $product_id == 87 ) {
            $email_heading = 'WooCommerce email notification OR how to test WooCommerce emails';
        }
        return $email_heading;
    }
}
add_filter( 'woocommerce_email_heading_customer_processing_order', 'woocommerce_custom_email_per_product_depending_on_product_id', 10, 5 );

Now that you know the entire process of Customizing a WooCommerce order email, you can either retain the function or create a separate WooCommerce email plugin for WooCommerce email confirmation and notification.

How to Customize WooCommerce Emails with Plugins

Although various plugins are available for customizing WooCommerce emails, one effective option is the MailPoet extension.

To begin, install the MailPoet extension from your WordPress dashboard, following the same process as any other plugin. Afterward, follow these simple steps:

  • Navigate to MailPoet → Settings → WooCommerce on your WordPress dashboard. Select “Use MailPoet to Customize Your WooCommerce Emails” and save your settings.
  • Click “Open Template Editor.”

mailpoet template editor

  • Utilize MailPoet’s drag-and-drop editor to make changes.

mailpoet drag and drop editor

  • You can easily experiment with areas above and below the email header and main content area. Some adjustments you can make include:
    • Placing your logo at the top
    • Matching colors with your brand
    • Adding pictures or buttons for a bit of flair
    • Inserting links to social media

mailpoet customizations

MailPoet also lets you sort your audience based on specific details, helping you customize your communication for different segments. You can categorize individuals based on:

  • How often they open emails
  • Amount spent
  • Items purchased
  • Location
  • Active subscription status
  • Clicking certain links
  • Sign-up date

Simplify WooCommerce Email Customization with Cloudways Hosting

Effortlessly customize your WooCommerce order emails using Cloudways hosting. Experience seamless plugin integration for hassle-free customizations.

How to Edit WooCommerce Transactional Emails

Customizing transactional emails in WooCommerce is crucial for establishing a personalized and engaging communication channel with your customers. By tailoring these emails to align with your brand identity and customer expectations, you can enhance the overall shopping experience.

Here are the steps to customize your transactional emails in WooCommerce:

1. Access Email Settings:

  • Log in to your WordPress dashboard.
  • In the left-hand menu, click on WooCommerce → Settings.

WordPress dashboard WooCommerce Settings

2. Navigate to Email Templates:

  • In the top menu, find and click on “Emails” to access the templates.

3. Explore Email Templates:

  • You’ll see a list of email templates, each serving a specific purpose, such as New Order, Canceled Order, and Password Reset.

Choose the Template to Edit

4. Choose the Template to Edit:

  • Click the “Manage” button next to the email template you want to edit.

5. Customize Email Content:

  • In the editing interface, tailor the email subject line, heading, and content to suit your preferences.

6. Utilize Template Variables:

  • If you have the WooCommerce Follow-ups extension, use template variables like {customer_name} or {order_shipping_address} to automate personalized information.

7. Additional Content Field:

  • Utilize the “Additional Content” field, particularly in customer-facing emails like the Completed Order email. Consider adding a thank-you note to show appreciation and infuse brand personality.

8. Provide Useful Links:

  • Include links to warranty information, return policies, or other relevant documentation for easy customer access post-purchase.

Summary

Setting up a WooCommerce store is pretty easy but customizing the default email templates becomes tricky sometimes. In this article, I discussed how you could send fully customized WooCommerce-hosted store emails to accommodate all aspects of the store’s activities.

I also highlighted the way in which the default email templates can be altered to insert store-specific and order-specific information in emails to provide a better user experience.

Q1. How do I customize my WooCommerce email?

A. You can edit the default email template from WooCommerce > Settings > Emails, but this is limited to basic customization like colors, a header image, and footer text.

Q2. Does WooCommerce send order Emails?

A. Yes, WooCommerce sends order emails by default, but they are not personalized. You can do it by following the methods I’ve mentioned in this article.

Q3. How do I add custom email notifications to WooCommerce?

A. To add custom email notifications in WooCommerce, first, install the plugin and navigate to WooCommerce → Settings. In the “Emails” tab, edit templates, customize recipient and sender details, and adjust content using the visual editor. Save changes to configure personalized email notifications for your store.

Q4. How do I add a custom field to my WooCommerce email?

A. To add a custom field to your WooCommerce email, use this code snippet in your theme’s functions.php file or a custom plugin:

add_filter('woocommerce_email_order_meta_fields', 'custom_woocommerce_email_order_meta_fields', 10, 3);

function custom_woocommerce_email_order_meta_fields($fields, $sent_to_admin, $order) {
    $fields['custom_field_example'] = array(
        'label' => __('Custom Field Example'),
        'value' => get_post_meta($order->id, 'custom_field_example', true),
    );
    return $fields;
}

Replace ‘custom_field_example’ with the actual name of your custom field.

Q5. How do I customize my WordPress email?

A. To customize WordPress emails, start by installing the Email Templates plugin. Once installed, go to Appearance > Email Templates to personalize the default email template.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Owais Alam

is the WordPress Community Manager at Cloudways - A Managed WooCommerce Hosting Platform and a seasoned PHP developer. He loves to develop all sorts of websites on WordPress and is in love with WooCommerce in particular. You can email him at [email protected]

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now