WooCommerce Webhook: invalid URL

woocommerce webhook order completed
woocommerce webhook delivery url
printful woocommerce webhooks
woocommerce webhooks not firing
error: delivery url cannot be reached: a valid url was not provided.
how to test webhooks locally
woocommerce webhook action events
woocommerce webhook retry

I am setting up WooCommerce to trigger a webhook upon order creation. I have set the webhook's URL as the url of a local web API we have setup for this purpose:

http://localhost:3000/store/orders/new

WooCommerce does trigger the webhook with the correct data payload, but the request is reported as failed in the webhook's logs:

Status: HTTP http_request_failed Es wurde keine gültige URL übermittelt.: Array

which, translated from German, means "no valid URL was passed"

I then later changed the URL to a web-facing deployment of our API (https://xxx.azurewebsites.net/store/order/new), and the webhook was received without any problems by the API.

I am not sure if WC webhook's don't play nice with urls that have a custom port (in my case, port 3000), so I wanted to ask the question on whether this is true and if there is a way to make WC webhooks play nice with a localhost development environment.


It is not the custom port, but localhost.

There is a check in wp-includes/http.php wp_http_validate_url() that rejects all kinds of local IPs unless specifically allowed with a filter on http_request_host_is_external that returns true...

Cheers, Björn

Invalid URL Stripe Webhook Setup, Hello, I'm trying to complete the setup for connecting Stripe to WooCommerce. Woocommerce supplies me with a url (https://ujamaabox.com/?… A Webhook is an event notification sent to a URL of your choice. Users can configure them to trigger events on one site to invoke behavior on another. Webhooks are useful for integrating with third-party services and other external API that support them.


For WooCommerce version 3.3.5, Bjorn's solution doesn't seem to work.

In my case, I had to eddit the file wp-content/plugins/woocommerce/includes/class-wc-webhook.php:185, method deliver.

Comment the wp_safe_remote_request method, and instead, use the insecure http request method.

// Webhook away!
$http_call = _wp_http_get_object();
$response = $http_call->request( $this->get_delivery_url(), $http_args );
//$response = wp_safe_remote_request( $this->get_delivery_url(), $http_args );

localhost webhook URL is invalid · Issue #23139 · woocommerce , product.update hook works fine for http://requestbin.fullcontact.com/1m3ici41 but fails for localhost with 2019-03-25T17:46:53+00:00 INFO  Webhooks is a term used for sending data to a URL when an event happens. An example is when someone subscribes to an email marketing list, the service that manages the list can send data like the subscriber’s name and email to another system like a Customer Relationship Manager.


in the following function

/** * Validate a URL for safe use in the HTTP API. * * @since 3.5.2 * * @param string $url * @return false|string URL or false on failure. */

comment this line

if ( isset( $parsed_home['host'] ) ) {
        //$same_host = ( strtolower( $parsed_home['host'] ) === strtolower( $parsed_url['host'] ) || 'localhost' === strtolower( $parsed_url['host'] ) );
        $same_host = false;
    } else {
        $same_host = false;
    }

and if you're using another port for example in laravel you have to add the port here

if ( empty( $parsed_url['port'] ) )
        return $url;

    $port = $parsed_url['port'];
    if ( 80 === $port || 443 === $port || 8080 === $port || 8000 === $port )
        return $url;

    if ( $parsed_home && $same_host && isset( $parsed_home['port'] ) && $parsed_home['port'] === $port )
        return $url;

    return false;
}

How to Test WooCommerce Webhooks, Wondering what WooCommerce webhooks are and how to test them? a third party URL, a 401 typically means the request has invalid data. woocommerce_webhook_topic_hooks. Delivery URL: This is the URL where the Webhook payload will be delivered. Secret: The secret field generates a hash for the body of Webhook. That hash is further provided in the request headers. Webhook can be authorized on the receiving part by using this hash. API Version: Out of three API versions, choose one. If you don’t have any specific condition, leave this as “WP Rest API Integration V2”.


WooCommerce Webhook: invalid URL, I am setting up WooCommerce to trigger a webhook upon order creation. I have set the webhook's URL as the url of a local web API we have  On woocommerce_init, active webhooks are loaded and their associated hooks are added. Each webhook has: status: active (delivers payload), paused (delivery paused by admin), disabled (delivery paused by failure) topic: determines which resource events the webhook is triggered for; delivery URL: URL where the payload is delivered, must be HTTP or HTTPS


My webhook URL is invalid or not working. What is the problem , This means that some valid URLs will nevertheless be refused by Mollie. The webhook is an essential component of the Mollie payments API. A reporting URL​  Head to WooCommerce > Settings > Payments > Stripe. Under the Webhook Endpoints section copy your webhook endpoint URL. Next in your Stripe Dashboard go to Webhook Setting and select Add Endpoint at the top right. Paste the webhook endpoint URL copied earlier into the Endpoint URL field and click receive all events.


Using Webhooks, What are Webhooks? ↑ Back to top. A Webhook is an event notification sent to a URL of your choice. Users can configure them to trigger events on one site to  Auto generating API keys using our Application Authentication Endpoint. This endpoint can be used by any APP to allow users to generate API keys for your APP. This makes integration with WooCommerce API easier because the user only needs to grant access to your APP via a URL. After being redirected back to your APP,