All snippets

Add text to the WooCommerce processing order email

Add a short instruction below the order table in a customer email. The snippet handles HTML, plain text and the WooCommerce email type.

This snippet adds a paragraph to customer_processing_order emails. It creates no new message and changes no sending rules. Use it for a short contact instruction shared by those messages.

Installation and code

Add one language version to a PHP snippet set to run everywhere, or to your child theme’s functions.php. Test on a staging copy first. The example omits the opening PHP tag. Do not activate both language versions together.

add_action( 'woocommerce_email_after_order_table', function ( $order, $sent_to_admin, $plain_text, $email ) {
    if ( ! $order instanceof WC_Order || $sent_to_admin || ! $email instanceof WC_Email || 'customer_processing_order' !== $email->id ) { return; }
    $message = 'If you need to provide more information about your order, contact us and include the order number.';
    if ( $plain_text ) {
        echo "\n" . $message . "\n";
    } else {
        echo '<p>' . esc_html( $message ) . '</p>';
    }
}, 20, 4 );

Usage and checks

Edit message. Use your own test order to inspect the processing message in HTML and plain-text formats. The paragraph should be absent from administrator, completed-order and on-hold emails. Resending the supported message naturally includes the paragraph again.

Limitations and removal

The email template must call woocommerce_email_after_order_table with its standard arguments. A builder that omits the hook will not show this output. The snippet does not establish inbox delivery and is not intended for item-specific instructions. Any dispatch-time statement must reflect your actual workflow.

Disable the snippet to remove its output. The examples use fixed language strings; connect them to your translation system for a multilingual store. PHP behaviour was checked on WordPress 7.1.5, WooCommerce 11.3.1 and PHP 8.4.23; verify appearance in your own theme or email template.

Use Happy Email for conditions and delayed messages; check existing notifications to avoid duplicates.

Technical reference