Skip to content

Instantly share code, notes, and snippets.

@landbryo
Created October 10, 2018 18:04
Show Gist options
  • Save landbryo/bf40a08f84f69af0966b4eabd99a173e to your computer and use it in GitHub Desktop.
Save landbryo/bf40a08f84f69af0966b4eabd99a173e to your computer and use it in GitHub Desktop.
Add a message to the beginning of a WooCommerce order email. Change which order email by updating what is currently set to 'customer_processing_order'
<?php
add_action('woocommerce_email_before_order_table', 'custom_order_header', 20, 4);
function custom_order_header( $order, $sent_to_admin, $plain_text, $email ) {
if ($email->id == 'customer_processing_order') {
echo '<p>Once your order is processed...</p>';
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment