# "Order Status Changed" Webhook Topic

> Adds an "Order status changed" topic to WooCommerce webhooks, so your integration is told about every status change instead of every order edit.

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

## Code

```php
add_filter( 'woocommerce_webhook_topic_hooks', function ( $topics ) {
    $topics['order.status_changed'] = array( 'woocommerce_order_status_changed' );

    return $topics;
} );

add_filter( 'woocommerce_valid_webhook_events', function ( $events ) {
    $events[] = 'status_changed';

    return $events;
} );

add_filter( 'woocommerce_webhook_topics', function ( $topics ) {
    $topics['order.status_changed'] = 'Order status changed';

    return $topics;
} );
```

## Notes

Choose "Order status changed" when creating a webhook under WooCommerce > Settings > Advanced > Webhooks; the payload is the full order.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find ""Order Status Changed" Webhook Topic" 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/
