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 "Nice one, you've got a new order!
";
}
};
add_action( 'woocommerce_email_header', 'ecommercehints_email_header_custom_content', 20, 2);