From 3f6b7aa522ab4ed3f4ed4adae4c531ab89deff0d Mon Sep 17 00:00:00 2001 From: Joeri van Veen Date: Tue, 22 Oct 2024 14:18:26 +0200 Subject: [PATCH] fix(webhook): process webhook when received INT-572 --- src/App/Webhook/PdkWebhookManager.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/App/Webhook/PdkWebhookManager.php b/src/App/Webhook/PdkWebhookManager.php index ee0c4764e..ba2278b3c 100644 --- a/src/App/Webhook/PdkWebhookManager.php +++ b/src/App/Webhook/PdkWebhookManager.php @@ -57,7 +57,13 @@ public function call($input, string $context = self::CONTEXT_WEBHOOK): Response return $response; } - $this->cronService->dispatch([$this, 'processWebhook'], $input); + /** + * TODO: restore async calling using cronService when this is fixed in WordPress + * besides fixing the wp_schedule_single_event, you also need a Facade to call processWebhook statically + * $this->cronService->dispatch([$this, 'processWebhook'], $input); + * For now: process immediately + */ + $this->processWebhook($input); return $response; }