# Longer Timeout for WooCommerce Webhooks

> Gives the services that receive your WooCommerce webhooks more time to answer, which stops slow endpoints such as Zapier or ERPs from being logged as failed.

- 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-longer-timeout/

## Code

```php
$wpide_webhook_timeout = 20; // Seconds.

add_filter( 'woocommerce_webhook_http_args', function ( $args ) use ( $wpide_webhook_timeout ) {
    $args['timeout'] = $wpide_webhook_timeout;

    return $args;
} );
```

## Notes

WooCommerce's default is 5 seconds, and webhooks are sent in the background so customers never wait.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Longer Timeout for WooCommerce Webhooks" 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/
