I'm developing an order management system that hooks into WooCommerce but the Webhook behaves irregularly. The Webhook gets disabled on its own.

I've investigated with the users - none of them have privileges. The administrator hasn't touched this section and hasn't updated any of the plugins.

Are there any reasons this would happen? Maybe returning http errors from my side?

WordPress: 4.4.1
WooCommerce: 2.3.8
  • Why am I downvoted, did I do something wrong?
    – Alex Seif
    Commented Jan 18, 2016 at 13:51
  • 2
    Not my downvote, but I see no information to work off of. There is zero code, there isn't even a name of the webhook in question, which makes it impossible to search around for similar troubles people may have testified about online. Commented Jan 18, 2016 at 16:10
  • 1
    Thank you for the help so far, but I'm confused. Why would there be any code, it's a WooCommerce webhook, it's configured for "order.created", has a secret and is activated. Then suddenly it's disabled.
    – Alex Seif
    Commented Jan 18, 2016 at 20:49
  • How did you configure it? What is the hook's name? Commented Jan 20, 2016 at 2:07
  • I really don't understand the relevance of this question. The name is something you choose. Anyhow the Name: ERP Webhook Status: Active Topic: order.created
    – Alex Seif
    Commented Jan 20, 2016 at 17:27

3 Answers 3


If you don't want to fix this every time WooCommerce updates, just create a filter in your child-theme:

function overrule_webhook_disable_limit( $number ) {
    return 999999999999; //very high number hopefully you'll never reach.
add_filter( 'woocommerce_max_webhook_delivery_failures', 'overrule_webhook_disable_limit' );
  • No need for a function. There's a constant in PHP for that: PHP_INT_MAX; Which is the highest number PHP can handle.
    – Casper
    Commented Mar 10 at 3:24

Apparently a WooCommerce Webhook will automatically disable due to delivery failure. https://docs.woothemes.com/document/webhooks/#section-3

“Disabled” (does not deliver due delivery failures).


Automatically disabled due to delivery failures (as mentioned above).

Because I'm depending on them a lot and never wants them disabled (no matter what), you can change function called failed_delivery() in this file: plugins/woocommerce/includes/class-wc-webhook.php to this:

private function failed_delivery() {

    $failures = $this->get_failure_count();

    if ( $failures > apply_filters( 'woocommerce_max_webhook_delivery_failures', 5 ) ) {

        //$this->update_status( 'disabled' );
        update_post_meta( $this->id, '_failure_count', ++$failures );

    } else {

        update_post_meta( $this->id, '_failure_count', ++$failures );

and they will never be automagically disabled again.

  • 3
    Don't EVER edit third party plugins files and even less tell people to do that.
    – Casper
    Commented Jul 12, 2019 at 17:45
  • I have to disagree. What if you want to fix vulnerability yourself which author can't fix on time? Or customise something? Obviously you EDIT third party plugin files. Just know what you're doing and keep it up to date with your changes. Better safe than sorry. Commented Dec 17, 2019 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.