Recipe: Order status triggers

Goal

Understand — and, if needed, customize — the order status trigger registry: the single table that decides which WooCommerce status an order gets when something happens to it, and what label the app shows for that status.

Every status change in the app order pipeline goes through this registry: order creation, payment success/failure, the vendor “change order status” and “complete order” forms, and the open-orders status categories all resolve a trigger slug to a WooCommerce status through it.


The built-in triggers

Trigger slug Fires when WooCommerce status App display label
order_created a new order is created via the app or website wc-processing Processing
payment_completed payment for an order is confirmed wc-processing Processing
payment_pending an order is pending payment wc-pending Pending Payment
payment_failed payment for an order failed wc-failed Failed
order_completed an order is fulfilled wc-completed Completed
order_placed_on_hold an order is placed on hold wc-on-hold On Hold
order_cancelled an order is cancelled wc-cancelled Cancelled
order_refunded an order is refunded wc-refunded Refunded

In the default pipeline: a submitted order starts at payment_pending, moves to order_created when the charge succeeds, and to payment_failed when it doesn’t. When a status is applied through a trigger, the trigger’s display label is also stored on the order (display_status meta) so the app shows the friendly name.


Changing a mapping

The registry is the get_order_status_triggers filter. To remap a trigger — say new app orders should land in On Hold instead of Processing — add a small snippet (mu-plugin or your site plugin) after the defaults (the plugin registers them at priority 1):

add_filter( 'get_order_status_triggers', function ( array $triggers ) {
    $triggers['order_created']['wc_status']      = 'wc-on-hold';
    $triggers['order_created']['display_status'] = 'Received';
    return $triggers;
}, 20 );

You can also add new trigger slugs the same way (each entry needs desc, wc_status, and display_status); the vendor status forms and the open-orders screens pick them up automatically.

To resolve a single trigger in code, use the companion filter:

$wc_status = apply_filters( 'get_wc_status_using_trigger', 'order_completed' ); // 'wc-completed'

Notes

  • Custom WooCommerce statuses work — register the status with WooCommerce first, then point a trigger’s wc_status at it.
  • The display label only affects the app; wp-admin keeps showing WooCommerce’s own status name.
  • These triggers are consumed by mam-woocommerce, MAM WooCommerce Product Vendors, and MAM WooCommerce Delivery — a remap applies suite-wide.


Metadata

Field Value
Article type Recipe (Admin / Integrator)
Plugin slug mam-woocommerce
Applies to plugin version 26.19.3+
Category Building Your App
Audience WordPress admin, PHP developer for customization
Estimated time 10 minutes
Last verified 2026-06-10
Contents

    Need Support?

    Can't find the answer you're looking for? Don't worry we're here to help!