# Add a Message to the Order Completed Email

> Inserts your own paragraph, such as care instructions or a review request, above the order details in the WooCommerce "Order completed" email.

- Type: PHP
- Runs: Run everywhere
- Category: [Email](https://wpide.com/library/category/email/)
- Requires: WooCommerce
- Tags: email, woocommerce, orders, templates
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/email-woo-completed-order-text/

## Code

```php
add_action( 'woocommerce_email_before_order_table', function ( $order, $sent_to_admin, $plain_text, $email ) {
    $message = 'Thank you for your order! We would love to hear what you think, so keep an eye out for a short review request next week.';

    if ( $sent_to_admin || ! $email || 'customer_completed_order' !== $email->id ) {
        return;
    }

    if ( $plain_text ) {
        echo esc_html( $message ) . "\n\n";
    } else {
        echo '<p>' . esc_html( $message ) . '</p>';
    }
}, 10, 4 );
```

## Notes

Change $message. Plain-text emails get the message without HTML.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Add a Message to the Order Completed Email" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
