Add Text to The Emails Body

, ,
A man with tools

In WooCommerce, with every order, comes one or more emails. WooCommerce sends automatically to the shop manager or to the customer, depending on the current step of the purchase process and they have some pre-defined messages.

These messages change based on the email sent and there are no options to change them. Sometimes you may need to add more text to all emails, such as a notice that says that the order is an online order. How do you do this?

Guess what? Custom code!

Open the file functions.php in wp-content/themes/your-child-theme-name/ and add this code at the end of the file:

add_action( 'woocommerce_email_header', 'add_email_header', 20 );
function add_email_header() {
echo '<h2>My Heading</h2>';
echo '<p>Add content here</p>';
view raw functions.php hosted with ❤ by GitHub

This will add the specified content right after the header section of the email but before any pre-defined content.



Make a one-time donation

Make a monthly donation

Make a yearly donation

Choose an amount


Or enter a custom amount


Your contribution is appreciated.

Your contribution is appreciated.

Your contribution is appreciated.

DonateDonate monthlyDonate yearly
5 replies
  1. Herbatka
    Herbatka says:

    That’s great idea! I’m wondering how to use it for one type of email only? I’d like to add some text in completed order email.


Trackbacks & Pingbacks

  1. […] Would you like to change also the content of your emails? Check out how to add text to the email body! […]

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply