From 524809d6f6d9ad19f8c5b543361e58e1d70c0b09 Mon Sep 17 00:00:00 2001 From: David Remer Date: Mon, 6 Jul 2020 13:56:33 +0300 Subject: [PATCH] switch to POST method in rest endpoint and do not replace http:// by default --- modules.local/ppcp-webhooks/src/IncomingWebhookEndpoint.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules.local/ppcp-webhooks/src/IncomingWebhookEndpoint.php b/modules.local/ppcp-webhooks/src/IncomingWebhookEndpoint.php index d87c3ddf1..78e61f642 100644 --- a/modules.local/ppcp-webhooks/src/IncomingWebhookEndpoint.php +++ b/modules.local/ppcp-webhooks/src/IncomingWebhookEndpoint.php @@ -24,7 +24,7 @@ class IncomingWebhookEndpoint self::ROUTE, [ 'methods' => [ - 'GET', + 'POST', ], 'callback' => [ $this, @@ -44,7 +44,7 @@ class IncomingWebhookEndpoint } public function url() : string { - return str_replace('http://', 'https://', rest_url(self::NAMESPACE . '/' . self::ROUTE )); + return rest_url(self::NAMESPACE . '/' . self::ROUTE); } public function handledEventTypes() : array {