File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
app/code/Magento/Checkout/Model/Type Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -491,15 +491,15 @@ public function saveBilling($data, $customerAddressId)
491
491
)->setCollectShippingRates (
492
492
true
493
493
)->collectTotals ();
494
- if ($ this ->getQuote ()-> getCheckoutMethod () != self :: METHOD_REGISTER ) {
494
+ if (! $ this ->isCheckoutMethodRegister () ) {
495
495
$ shipping ->save ();
496
496
}
497
497
$ this ->getCheckout ()->setStepData ('shipping ' , 'complete ' , true );
498
498
break ;
499
499
}
500
500
}
501
501
502
- if ($ this ->getQuote ()-> getCheckoutMethod () == self :: METHOD_REGISTER ) {
502
+ if ($ this ->isCheckoutMethodRegister () ) {
503
503
$ this ->quoteRepository ->save ($ this ->getQuote ());
504
504
} else {
505
505
$ address ->save ();
@@ -522,6 +522,16 @@ public function saveBilling($data, $customerAddressId)
522
522
return [];
523
523
}
524
524
525
+ /**
526
+ * Check whether checkout method is "register"
527
+ *
528
+ * @return bool
529
+ */
530
+ protected function isCheckoutMethodRegister ()
531
+ {
532
+ return $ this ->getQuote ()->getCheckoutMethod () == self ::METHOD_REGISTER ;
533
+ }
534
+
525
535
/**
526
536
* Validate customer data and set some its data for further usage in quote
527
537
*
You can’t perform that action at this time.
0 commit comments