Signature
$triggers = apply_filters( 'get_order_status_triggers', array() );
Returns an array keyed by trigger slug. Each entry:
| Key | Type | Description |
|---|---|---|
desc |
string |
Human description (“When a new order is created via the app or website”). |
wc_status |
string |
The WooCommerce status to apply, with the wc- prefix (e.g. wc-processing). |
display_status |
string |
The label the app shows (e.g. “Processing”). |
mam-woocommerce registers the eight default triggers (order_created, payment_completed, payment_pending, payment_failed, order_completed, order_placed_on_hold, order_cancelled, order_refunded) at priority 1, so add your filter at the default priority or later to override or extend them. The full default table is in Recipe: Order status triggers.
Companion: get_wc_status_using_trigger
$wc_status = apply_filters( 'get_wc_status_using_trigger', string $trigger_slug );
Resolves one trigger slug to its wc_status through the registry. Unknown slugs are returned unchanged — which means you can also pass a literal WooCommerce status through it safely.
Who consumes the registry
- mam-woocommerce’s own pipeline (initial order status, charge success/failure) and the vendor change status / complete order form handlers — which also stamp the trigger’s
display_statusonto the order for the app. - MAM WooCommerce Product Vendors (status dropdowns on the vendor forms, open/all-orders status categories, phone data).
- MAM WooCommerce Delivery (open-orders screen).
Example — add a custom trigger
add_filter( 'get_order_status_triggers', function ( array $triggers ) {
$triggers['out_for_delivery'] = array(
'desc' => 'When the driver picks the order up',
'wc_status' => 'wc-out-for-delivery', // register this status with WooCommerce separately
'display_status' => 'Out for Delivery',
);
return $triggers;
}, 20 );
Related articles
- Recipe: Order status triggers
- Plugin: mam-woocommerce
Metadata
| Field | Value |
|---|---|
| Article type | Hook Reference |
| Plugin slug | mam-woocommerce |
| Applies to plugin version | 26.19.3+ |
| Category | Extending MAM Suite |
| Hook type | filter |
| Audience | PHP developer |
| Last verified | 2026-06-10 |
