# "Ready for Pickup" Order Status With Customer Email

> Adds a "Ready for pickup" order status and emails the customer automatically when you set it, so click-and-collect customers know when to come in.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, orders, status, local-pickup
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-ready-for-pickup-status/

## Code

```php
$wpide_pickup_email = array(
    'subject' => 'Your order #{order_number} is ready for pickup',
    'heading' => 'Ready for pickup',
    'body'    => 'Hi {first_name}, good news: your order is packed and waiting for you at our shop. Please bring your order number when you collect it.',
);

add_filter( 'woocommerce_register_shop_order_post_statuses', function ( $statuses ) {
    $statuses['wc-ready-pickup'] = array(
        'label'                     => 'Ready for pickup',
        'public'                    => false,
        'exclude_from_search'       => false,
        'show_in_admin_all_list'    => true,
        'show_in_admin_status_list' => true,
        /* translators: %s: number of orders */
        'label_count'               => _n_noop( 'Ready for pickup <span class="count">(%s)</span>', 'Ready for pickup <span class="count">(%s)</span>' ),
    );

    return $statuses;
} );

add_filter( 'wc_order_statuses', function ( $statuses ) {
    $statuses['wc-ready-pickup'] = 'Ready for pickup';

    return $statuses;
} );

$wpide_pickup_bulk = function ( $actions ) {
    $actions['mark_ready-pickup'] = 'Change status to ready for pickup';

    return $actions;
};

add_filter( 'bulk_actions-woocommerce_page_wc-orders', $wpide_pickup_bulk, 20 );
add_filter( 'bulk_actions-edit-shop_order', $wpide_pickup_bulk, 20 );

add_filter( 'woocommerce_order_is_paid_statuses', function ( $statuses ) {
    $statuses[] = 'ready-pickup';

    return $statuses;
} );

add_action( 'woocommerce_order_status_ready-pickup', function ( $order_id, $order = null ) use ( $wpide_pickup_email ) {
    $order = $order instanceof WC_Order ? $order : wc_get_order( $order_id );

    if ( ! $order || ! $order->get_billing_email() ) {
        return;
    }

    $replace = array(
        '{order_number}' => $order->get_order_number(),
        '{first_name}'   => $order->get_billing_first_name(),
    );
    $mailer  = WC()->mailer();
    $message = $mailer->wrap_message( $wpide_pickup_email['heading'], wpautop( esc_html( strtr( $wpide_pickup_email['body'], $replace ) ) ) );

    $mailer->send( $order->get_billing_email(), strtr( $wpide_pickup_email['subject'], $replace ), $message );
    $order->add_order_note( 'Ready for pickup email sent to the customer.' );
}, 10, 2 );
```

## Notes

Edit the email wording in $wpide_pickup_email; it is sent with WooCommerce's email template and colours.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find ""Ready for Pickup" Order Status With Customer 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/
