Skip to content

Commit 9afb7bd

Browse files
committed
Swap condition to check if quote is virtual first
1 parent 0bcde8c commit 9afb7bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Checkout/Model/ShippingInformationManagement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function saveAddressInformation(
177177

178178
$shippingAddress = $quote->getShippingAddress();
179179

180-
if (!$shippingAddress->getShippingRateByCode($shippingAddress->getShippingMethod()) && !$quote->getIsVirtual()) {
180+
if (!$quote->getIsVirtual() && !$shippingAddress->getShippingRateByCode($shippingAddress->getShippingMethod())) {
181181
throw new NoSuchEntityException(
182182
__('Carrier with such method not found: %1, %2', $carrierCode, $methodCode)
183183
);

0 commit comments

Comments
 (0)