# Stop WooCommerce Disabling Webhooks After 5 Failures

> Raises the number of failed deliveries before WooCommerce switches a webhook off, so a short outage at the receiving service does not silently stop your integrations.

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

## Code

```php
$wpide_webhook_failures = 50; // Failures allowed before the webhook is disabled.

add_filter( 'woocommerce_max_webhook_delivery_failures', function () use ( $wpide_webhook_failures ) {
    return $wpide_webhook_failures;
} );
```

## Notes

Failed deliveries are still logged under WooCommerce > Status > Logs.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Stop WooCommerce Disabling Webhooks After 5 Failures" 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/
