WooCommerce Custom Content Under New Order Email Heading

WooCommerce New Order email showing custom content under header


There are no pre-requisites in order for you to be able to implement this solution.

How To Implement This Solution?

Simply copy the pre-coded solution to your active theme’s functions.php or preferably the Code Snippets Plugin.

About this Solution

As you know, editing the WooCommerce template core files is a big fat no-no for security and update purposes. If you need to make edits to the emails, you’re much better off doing this by targeting the email ID and using hooks as necessary. This quick guide shows you how you can target the New Order email which is sent to the store admin to notify them of a new sale. More specifically, how to add custom content under the header in this specific email to meet the needs of your business.

* Snippet Name:		Display custom content under New Order email header
* Snippet Author:	ecommercehints.com

function ecommercehints_email_header_custom_content( $email_heading, $email ) { 
    if ($email->id == 'new_order') {	
	echo "<p>Nice one, you've got a new order!</p>";
add_action( 'woocommerce_email_header', 'ecommercehints_email_header_custom_content', 20, 2); 

Snippet Benefits

  • Customise the New Order email which is sent to the store admin to notify them of a new sale.
WooCommerce Conversion Rate Optimisation (CRO) eBook
100 WooCommerce Conversion Rate Optimisation Tips

Leave a Reply

If you are going to write code in the comments, please wrap it between code tags.

Your email address will not be published. Required fields are marked *

Other Recent Guides

Subscribe To Emails

Get exclusive WooCommerce tips that I only share with email subscribers

Join hundreds of other subscribers