From 3e0856d96a4bebfbbd964c469699daa438ee9ebd Mon Sep 17 00:00:00 2001 From: tl-ariel-reano Date: Tue, 7 May 2024 09:53:06 +0100 Subject: [PATCH] Stop collecting shipping rates before creating saving the quote --- Service/Order/ProcessWebhook.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Service/Order/ProcessWebhook.php b/Service/Order/ProcessWebhook.php index 8337984..f2fd318 100644 --- a/Service/Order/ProcessWebhook.php +++ b/Service/Order/ProcessWebhook.php @@ -200,6 +200,8 @@ private function prepareQuote(CartInterface $quote, string $userId): CartInterfa $quote->setCustomerIsGuest($quote->getCustomerId() == null); $quote->setIsActive(true); + // stop collecting shipping rated to avoid losing the shipping method with saving the quote. This happens while using custom shipping methods + $quote->getShippingAddress()->setCollectShippingRates(false); $this->quoteRepository->save($quote); return $quote; }