# How to Add Custom Text to WooCommerce Emails
WooCommerce emails are crucial for communication with your customers. From order confirmations to shipping updates, these emails play a vital role in the customer journey. But sometimes, the default WooCommerce email templates don’t quite meet your needs. This article will guide you through various methods to add custom text to your WooCommerce emails, improving your branding and customer experience.
Understanding WooCommerce Email Templates
Before diving into the how-to, it’s important to understand where the text you see in your WooCommerce emails comes from. WooCommerce uses email templates, typically located in your `wp-content/plugins/woocommerce/templates/emails/` directory. These templates are usually `.php` files. Directly editing these files is generally not recommended, as updates could overwrite your changes. Instead, we’ll explore safer and more manageable methods.
Method 1: Using the WooCommerce Email Settings
WooCommerce offers a degree of customization through its built-in settings. While limited, this is the easiest method for simple text additions.
- Go to WooCommerce > Settings > Emails.
- Find the email type you want to modify (e.g., “Processing order,” “Completed order”).
- You might find options to add or edit text within the subject line and email body sections. These options vary depending on your WooCommerce version.
- Click “Save changes”.
- Create a child theme: This protects your customizations from being overwritten by WooCommerce updates. Create a new folder within your theme’s directory (e.g., `my-child-theme`).
- Copy the email template: Copy the relevant `.php` file (e.g., `customer-processing-order.php`) from the WooCommerce emails directory (`wp-content/plugins/woocommerce/templates/emails/`) to your child theme’s `emails` directory (create this directory if it doesn’t exist).
- Edit the template: Open the copied `.php` file in a text editor. Locate the areas where you want to add text. You’ll likely find placeholders like `{order_number}` and other variables. Add your custom text around these placeholders. For example:
Method 2: Using a Custom Email Template (Recommended)
This method allows for far more control and is the recommended approach for significant text changes or advanced customizations.
<?php /**
defined( ‘ABSPATH’ ) || exit;
/
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( ‘woocommerce_email_header’, $email_heading, $email ); ?>
Thank you for your order, {order_number}!
We’re processing your order and will send you another email when it ships. This is my custom text!
<?php
/
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( ‘woocommerce_email_footer’, $email ); ?>
- Save and upload: Save the changes to your file and upload the updated file to your child theme’s `emails` directory.
Method 3: Using a WooCommerce Email Plugin
Several plugins offer advanced email customization. These plugins usually provide user-friendly interfaces to edit email templates without touching code directly. This is a great option if you’re not comfortable editing `.php` files.
Conclusion
Adding custom text to your WooCommerce emails enhances your brand identity and improves communication with your customers. While the built-in settings are useful for minor adjustments, creating custom email templates within a child theme provides the most control and flexibility. If coding isn’t your forte, consider using a dedicated WooCommerce email plugin for a user-friendly alternative. Remember always to back up your files before making any changes.