Skip to content

WooCommerce webhook disabled or not delivering: fix it

Find out why a WooCommerce webhook stopped sending orders to your accounting, warehouse or automation tool, fix the cause, and turn it back on without it switching off again. You will also re-send the orders it missed and add an alert for next time.

Your accounting system, warehouse tool or Zapier flow has stopped receiving new WooCommerce orders, and the webhook that feeds it now says Disabled or sends nothing. A webhook is the store’s outgoing message: each time an order is created or updated, WooCommerce sends an HTTP POST with the order data to a URL you chose. WooCommerce switches a webhook off by itself after seven failed deliveries in a row, never retries the failed ones, and tells nobody. To fix it, read the response code in the delivery log and repair the receiving end. Then prove the fix with one test delivery, set the webhook back to Active and re-send what was missed.

What you’ll accomplish

  • Know the webhook’s real state: its status, its failure counter and when it last delivered.
  • Name the cause from the delivery log, by response code, instead of guessing.
  • Reset the failure counter with a successful test delivery before you reactivate, so the webhook does not switch off again on the next hiccup.
  • Re-send the orders that changed while the webhook was down.
  • Get an email the next time WooCommerce disables a webhook.

Prerequisites

  • WooCommerce 3.5 or newer. From that release, deliveries run through Action Scheduler, the background job queue bundled with WooCommerce. The behaviour below was checked against the WooCommerce source code as of November 2026.
  • An administrator account in WordPress, and shell access with WP-CLI (the WordPress command-line tool) for the commands. Run every command from the site’s root directory as the user that owns the files.
  • The webhook’s ID. In WooCommerce → Settings → Advanced → Webhooks, hover the webhook’s name; the edit link ends in edit-webhook=<id>. The examples use ID 3.
  • Access to the receiving system’s logs helps, but is optional.

How it works

The path of one WooCommerce webhook delivery. Saving an order queues the delivery until the request ends. An Action Scheduler job, run from WP-Cron, sends a POST to the delivery URL with a 60 second timeout and no redirects followed. A 2xx response resets the failure counter to 0. A 301 or 302 counts as success although the data never reaches its destination. A 4xx, 5xx or connection error adds one to failure_count, and the seventh failure in a row disables the webhook. Setting it back to Active leaves the counter at 6, so the next failure disables it again.

When an order is saved, WooCommerce checks every Active webhook whose topic matches, such as order.created or order.updated. A match is held in memory until the page request finishes. It then becomes an Action Scheduler job with the hook woocommerce_deliver_webhook_async in the group woocommerce-webhooks. If a job for the same webhook and the same order is already waiting, no second one is added. Several quick edits to one order can therefore produce a single delivery. The payload is built when the job runs, so it carries the latest data.

The job sends a POST with a JSON body and these headers: X-WC-Webhook-Topic, X-WC-Webhook-Resource, X-WC-Webhook-Event, X-WC-Webhook-ID, X-WC-Webhook-Delivery-ID, X-WC-Webhook-Source and X-WC-Webhook-Signature. It waits up to 60 seconds and does not follow redirects. Four rules explain almost every case:

  1. Any response from 200 to 302 counts as success and resets the counter to 0. A 301 or 302 is logged as a success, but because the redirect is not followed, the data never reaches its destination.
  2. Anything else is a failure: another HTTP code, a timeout, a DNS or TLS error. Each failure adds one to failure_count. When a failure arrives and the counter is already above 5 (the default of the woocommerce_max_webhook_delivery_failures filter), the webhook is set to Disabled. In practice that is the seventh failure in a row.
  3. Failed deliveries are never retried. The job is marked complete either way, so an order that changed during an outage is not sent again unless you send it.
  4. Setting the webhook back to Active does not reset the counter. Only a successful delivery does. Reactivate without fixing the cause and the very next failure disables it again.

Requests go out through wp_safe_remote_request(), the WordPress HTTP call that refuses addresses that look internal. A delivery URL fails before any connection is made if it uses a port other than 80, 443 or 8080. The same happens if it resolves to a private or reserved address, such as 10.x, 172.16.x to 172.31.x, 192.168.x, 127.x or 100.64.x to 100.127.x.

Step-by-step

  1. Read the webhook’s state. This prints each webhook’s status, failure counter and whether its first test request (the “ping”) is still pending:

    wp db query "SELECT webhook_id, name, status, failure_count, pending_delivery, api_version, delivery_url FROM $(wp db prefix)wc_webhooks"

    Example output:

    +------------+-----------------+----------+---------------+------------------+-------------+-------------------------------------------+
    | webhook_id | name            | status   | failure_count | pending_delivery | api_version | delivery_url                              |
    +------------+-----------------+----------+---------------+------------------+-------------+-------------------------------------------+
    |          3 | Orders to ERP   | disabled |             6 | 0                | 3           | https://erp.example.net/hooks/woocommerce |
    |          5 | Zapier products | active   |             2 | 0                | 3           | https://hooks.zapier.com/hooks/catch/...  |
    +------------+-----------------+----------+---------------+------------------+-------------+-------------------------------------------+

    disabled with failure_count 6 means WooCommerce switched it off. paused means a person did. An active webhook with a counter above 0 is failing now and will switch off soon. An api_version of -1 means the old Legacy REST API, covered in Troubleshooting.

  2. Find the response code in the delivery log. In WordPress, open WooCommerce → Status → Logs and pick the source webhooks-delivery. With the default file log handler, the same entries are on disk in wp-content/uploads/wc-logs/. Count the response codes:

    grep -h '\[Code\] =>' wp-content/uploads/wc-logs/webhooks-delivery-*.log | sort | uniq -c | sort -rn

    Example output:

         31             [Code] => 200
          7             [Code] => 403

    Then read the newest failing entry in full with grep -h -A4 '\[Code\] => 403' wp-content/uploads/wc-logs/webhooks-delivery-*.log | tail -5. The [Message] line under it gives the reason. Bodies are logged only when WP_DEBUG is on. If there are no entries at all, deliveries are not being attempted: go to step 3. Otherwise, match the code:

    Code in the logMost likely causeFix in
    401 or 403The receiver rejects the signature, or a firewall in front of it blocks the requestStep 5
    404 or 410The receiving URL was moved or deletedStep 4
    301 or 302 (logged as success)The URL redirects, for example http to httpsStep 4
    500 to 504The receiving application is crashing or overloadedThe receiver’s own logs
    http_request_failedTimeout, DNS, TLS or a refused address; the [Message] line says whichStep 4 and Troubleshooting
  3. Check that the delivery queue runs. Deliveries wait in Action Scheduler until WP-Cron, the WordPress task runner, processes them. Count the webhook jobs by state:

    wp db query "SELECT status, COUNT(*) AS jobs, MIN(scheduled_date_gmt) AS oldest FROM $(wp db prefix)actionscheduler_actions WHERE hook = 'woocommerce_deliver_webhook_async' GROUP BY status"

    Example output:

    +----------+------+---------------------+
    | status   | jobs | oldest              |
    +----------+------+---------------------+
    | complete |  412 | 2026-10-16 08:04:51 |
    | pending  |   58 | 2026-11-12 19:37:22 |
    +----------+------+---------------------+

    A few pending jobs from the last minutes are normal. Pending jobs hours or days old mean the queue is stuck, and the log is empty because nothing was sent. Fix the queue first: auditing the Action Scheduler queue covers stuck and failed jobs, and replacing WP-Cron with a system cron job stops it from depending on visitor traffic.

  4. Test the delivery URL from the store’s server. Run this on the web server, not your laptop, so you see what WooCommerce sees:

    curl -sS -o /dev/null -w '%{http_code} %{redirect_url}\n' -X POST -H 'Content-Type: application/json' --data '{}' https://erp.example.net/hooks/woocommerce

    Example output:

    301 https://erp.example.net/hooks/woocommerce/

    Any 2xx means the URL is reachable; a 400 or 401 here is fine too, because an empty body has no valid signature. A 301 or 302 prints the address it redirects to: put that exact address in the webhook’s Delivery URL field and save. A 404 means the receiver’s address changed, so get the current one from whoever runs that system. If curl reports Could not resolve host or a certificate error, the problem is DNS or the receiver’s TLS certificate, not WooCommerce.

  5. Fix a signature rejection. WooCommerce signs each delivery with the webhook’s Secret: X-WC-Webhook-Signature is the base64-encoded HMAC-SHA256 of the raw request body. A receiver returns 401 when it computes this from anything other than the exact bytes received, or uses a different secret. To compute the expected value by hand from a captured body:

    printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$SECRET" -binary | base64

    The output is one base64 line ending in =, and it must equal the header byte for byte. In a PHP receiver, the check looks like this:

    $body     = file_get_contents( 'php://input' );
    $expected = base64_encode( hash_hmac( 'sha256', $body, $secret, true ) );
    $received = $_SERVER['HTTP_X_WC_WEBHOOK_SIGNATURE'] ?? '';
    if ( ! hash_equals( $expected, $received ) ) {
        http_response_code( 401 );
        exit;
    }

    The usual mistakes are decoding and re-encoding the JSON before hashing, comparing against a hex digest instead of base64, and a secret that was regenerated on one side only. If the code is 403 and the receiver’s own log shows nothing, a firewall or bot filter in front of it is blocking the request. Every delivery carries a User-Agent starting with WooCommerce/ and the word Hookshot, which is what an allow rule can match.

  6. Send one test delivery while the webhook is still disabled. A delivery sent by hand goes out whatever the status, and a success resets the counter to 0. Pick a recent order ID (here 1187) and run:

    wp eval '$w = wc_get_webhook( 3 ); $w->deliver( 1187 ); echo "failures: ", $w->get_failure_count(), PHP_EOL;'

    Expected output:

    failures: 0

    failures: 0 means the receiver accepted it; the log also gains a new entry with a 2xx code. A higher number means the cause is still there: go back to step 2 and read the new entry. This sends real order data again, so warn the receiver’s owner or use an order that is safe to repeat.

  7. Set the webhook back to Active. In WordPress, edit the webhook, set Status to Active and click Save webhook. With WP-CLI:

    wp wc webhook update 3 --status=active --user=1

    Expected output:

    Success: Updated webhook 3.

    --user must be an administrator’s user ID. Re-run the query from step 1: the row should show active and failure_count 0.

  8. Re-send what was missed. Nothing is retried, so list the orders that changed since the first failure in the log. The modified_after filter takes an ISO 8601 date, and --per_page=100 lifts the default page size of 10:

    wp wc shop_order list --user=1 --modified_after=2026-11-10T00:00:00 --per_page=100 --fields=id,status,date_modified

    Example output:

    +------+------------+---------------------+
    | id   | status     | date_modified       |
    +------+------------+---------------------+
    | 1186 | processing | 2026-11-12T16:41:09 |
    | 1183 | completed  | 2026-11-11T09:12:55 |
    | 1179 | processing | 2026-11-10T18:03:27 |
    +------+------------+---------------------+

    An empty table means no order changed in that window, so there is nothing to re-send. If you get exactly 100 rows, add --page=2 to see the rest.

    If the receiving tool has its own “re-sync” or “import from WooCommerce” action, use it: it reads orders through the API and handles duplicates itself. Otherwise, re-deliver each listed ID, replacing the numbers with the IDs from your list:

    for id in 1179 1183 1186; do wp eval "wc_get_webhook( 3 )->deliver( $id );"; done

    Each run adds one log entry. Check the receiver shows each order once.

  9. Get an email the next time. WooCommerce fires the action woocommerce_webhook_disabled_due_delivery_failures when it disables a webhook, and sends nothing by default. Save this as wp-content/mu-plugins/webhook-disabled-alert.php; a must-use plugin loads on every request and cannot be switched off by accident in the Plugins screen:

    <?php
    add_action( 'woocommerce_webhook_disabled_due_delivery_failures', function ( $webhook_id ) {
        $webhook = wc_get_webhook( $webhook_id );
        $name    = $webhook ? $webhook->get_name() : '#' . $webhook_id;
        wp_mail(
            get_option( 'admin_email' ),
            'WooCommerce webhook disabled: ' . $name,
            'Webhook ' . $webhook_id . ' was disabled after repeated failed deliveries. Check WooCommerce > Status > Logs, source webhooks-delivery.'
        );
    } );

    wp eval 'echo has_action( "woocommerce_webhook_disabled_due_delivery_failures" ) ? "hooked" : "missing", PHP_EOL;' should print hooked. The mail only arrives if the site can send email at all.

Validate it works

Make a harmless change that fires the topic, such as saving a private note on a test order for an order.updated webhook. Within a few minutes, check three things:

grep -h '\[Code\] =>' wp-content/uploads/wc-logs/webhooks-delivery-*.log | tail -3
wp db query "SELECT status, failure_count FROM $(wp db prefix)wc_webhooks WHERE webhook_id = 3"
wp db query "SELECT COUNT(*) AS waiting FROM $(wp db prefix)actionscheduler_actions WHERE hook = 'woocommerce_deliver_webhook_async' AND status = 'pending' AND scheduled_date_gmt < UTC_TIMESTAMP() - INTERVAL 10 MINUTE"

You are done when the newest code is 200 (or another 2xx) and the webhook shows active with failure_count 0. No delivery job should have waited more than ten minutes, and the order should appear in the receiving system.

Troubleshooting

  • “Error: Delivery URL returned response code: 401” when you save. The first time a webhook is activated, WooCommerce sends a ping. It is a POST whose body is webhook_id=3, with no JSON and no signature header. A receiver that checks every signature rejects it. Make the receiver answer 200 to that body. The webhook is saved as Active either way, and real deliveries are still signed.
  • The log says A valid URL was not provided. The delivery URL resolves to a private or loopback address, or uses a port other than 80, 443 or 8080. Use the receiver’s public hostname. For an internal system you trust, a must-use plugin can return true from the http_request_host_is_external filter for that one host.
  • cURL error 28: Operation timed out after about 60 seconds. The receiver does its work before answering. Have it store the payload, answer 200 at once and process afterwards.
  • The receiver gets woocommerce_rest_cannot_view instead of an order. The payload is built as the user who created the webhook. If that account was deleted or lost its role, create the webhook again while logged in as a current administrator. Paste the old Secret into the new webhook so the receiver’s signature check still passes.
  • Failed jobs say “Unsupported webhook API version”. The delivery log stays empty, and Tools → Scheduled Actions lists failed woocommerce_deliver_webhook_async jobs with that message. The webhook still uses the Legacy REST API (api_version -1 in step 1), which left WooCommerce core in version 9.0 and now needs the separate WooCommerce Legacy REST API plugin. Edit it, choose the newest WP REST API version, and save.
  • You changed status with SQL and nothing happened. WooCommerce caches the list of active webhooks in a transient. Use the admin screen or wp wc webhook update instead, or run wp transient delete woocommerce_webhook_ids_status_active after the SQL change.

When this is the wrong approach

With no retries and an automatic shutdown, webhooks suit “tell the CRM a customer signed up” better than “every order must reach the accounting system”. If a missed order costs money, have the receiver also pull from the WooCommerce REST API on a schedule (see WooCommerce REST API authentication). The webhook then becomes the fast path, not the only one. If your problem is a payment gateway’s webhook that never reaches your store, read WooCommerce orders stuck on Pending payment instead. The WooCommerce webhooks documentation describes the admin screens and topics.

Running WordPress that earns real money deserves an operator — Stack Harbor runs that stack under Enterprise WordPress; book an infrastructure consult.