Skip to content

Instantly share code, notes, and snippets.

@Niloys7
Created February 13, 2023 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Niloys7/4a3e2f0df7b46148ad968f085a8be310 to your computer and use it in GitHub Desktop.
Save Niloys7/4a3e2f0df7b46148ad968f085a8be310 to your computer and use it in GitHub Desktop.
Add Content in custom status email template
/**
* How to edit or override the email templates for custom order status?
* @link https://brightplugins.com/docs/how-to-edit-or-override-the-email-templates-for-custom-order-status/
*/
add_action( 'woocommerce_email_before_order_table', 'brightplugins_add_content_specific_email', 20, 4 );
function brightplugins_add_content_specific_email( $order, $sent_to_admin, $plain_text, $email ) {
if ( $email->id == 'bvos_custom_transit' ) {
echo '<p>Content for Transit Status</p>';
}
if ( $email->id == 'bvos_custom_waiting-for-conf' ) {
echo '<p>Content for Waiting Status</p>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment