File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
app/code/Magento/Checkout/Model Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,11 @@ public function calculate(
52
52
$ quote ->setBillingAddress ($ addressInformation ->getAddress ());
53
53
} else {
54
54
$ quote ->setShippingAddress ($ addressInformation ->getAddress ());
55
- $ quote ->getShippingAddress ()->setCollectShippingRates (true )->setShippingMethod (
56
- $ addressInformation ->getShippingCarrierCode () . '_ ' . $ addressInformation ->getShippingMethodCode ()
57
- );
55
+ if ($ addressInformation ->getShippingCarrierCode () && $ addressInformation ->getShippingMethodCode ()) {
56
+ $ quote ->getShippingAddress ()->setCollectShippingRates (true )->setShippingMethod (
57
+ $ addressInformation ->getShippingCarrierCode ().'_ ' .$ addressInformation ->getShippingMethodCode ()
58
+ );
59
+ }
58
60
}
59
61
$ quote ->collectTotals ();
60
62
You can’t perform that action at this time.
0 commit comments