INFO
You usually don’t need code for this: the Additional content on additional emails setting (Settings → Display Options, card 7) adds a custom message to the selected order emails for pickup orders, and the Processing LP email’s content is edited in the email customizer. Use this snippet only when you need logic the settings can’t express. When both the setting and the snippet add content, both appear in the email.
Follow these steps to add a custom message before the order table in WooCommerce’s processing order email, for local pickup orders only:
1. Open your child theme's functions.php file
Edit the functions.php of your child theme (or use a code-snippets plugin). Don’t edit the parent theme — the change would be lost on theme updates.
2. Insert the following code snippet
/**
* Add a custom message before the order table in the
* processing order email, for local pickup orders only.
*/
add_action( 'woocommerce_email_before_order_table', 'my_alp_message_before_order_table', 10, 4 );
function my_alp_message_before_order_table( $order, $sent_to_admin, $plain_text, $email ) {
if ( 'customer_processing_order' !== $email->id ) {
return;
}
// Is this a local pickup order? Covers the classic zone-based
// method (local_pickup) and the block checkout method (pickup_location).
$is_pickup = false;
foreach ( $order->get_items( 'shipping' ) as $shipping_item ) {
if ( in_array( $shipping_item->get_method_id(), array( 'local_pickup', 'pickup_location' ), true ) ) {
$is_pickup = true;
break;
}
}
if ( ! $is_pickup ) {
return;
}
echo '<p>' . wp_kses_post( __( "You will receive an email when your order is ready for pickup. This will also include the pickup address. Please do not arrive to pick up your order until you have been notified it's ready.", 'my-textdomain' ) ) . '</p>';
}3. Save the file
Save the changes and place a test pickup order. Customize the message text as needed.
IMPORTANT
This snippet targets WooCommerce’s standard customer_processing_order email. If you use the Processing → Processing LP automation, the customer receives ALP PRO’s own Processing LP email as well — its content is edited in the email customizer, not by this snippet.
Next Steps
- How to Customize Email Notifications — the no-code way to change the pickup emails.
- Developers — all hooks and filters.