diff --git a/Service/Shipping/ShippingMethodService.php b/Service/Shipping/ShippingMethodService.php index c4e2fbd5..c2061fce 100644 --- a/Service/Shipping/ShippingMethodService.php +++ b/Service/Shipping/ShippingMethodService.php @@ -110,14 +110,13 @@ public function setShippingMethodInQuote( return $quote; } + $shippingAddress->setShippingMethod($methodId)->setCollectShippingRates(true)->collectShippingRates(); $rate = $shippingAddress->getShippingRateByCode($methodId); - if ($rate == null) { + if ($rate === false) { $shippingAddress->setShippingMethod(''); return $quote; } - $shippingAddress->setShippingMethod($methodId)->setCollectShippingRates(true)->collectShippingRates(); - $this->shippingInformationManagement->saveAddressInformation( $quote->getId(), $this->shippingInformationFactory->create()