File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
app/code/Magento/Checkout/Model Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,19 @@ public function customerCheckoutAddressMapper(
64
64
$ quote = $ this ->cartRepository ->getActive ($ cartId );
65
65
$ shippingAddress = $ quote ->getShippingAddress ();
66
66
$ quoteShippingAddressData = $ shippingAddress ->getData ();
67
- $ sameAsBillingFlag = (int )$ shippingAddress ->getSameAsBilling ();
67
+ $ quoteSameAsBilling = (int )$ shippingAddress ->getSameAsBilling ();
68
68
$ customer = $ quote ->getCustomer ();
69
69
$ customerId = $ customer ->getId ();
70
70
$ hasDefaultBilling = $ customer ->getDefaultBilling ();
71
71
$ hasDefaultShipping = $ customer ->getDefaultShipping ();
72
72
73
- if ($ sameAsBillingFlag !== 1 && !empty ($ quoteShippingAddressData ) && !empty ($ billingAddress )) {
73
+ if ($ quoteSameAsBilling === 1 ) {
74
+ $ sameAsBillingFlag = 1 ;
75
+ } elseif (!empty ($ quoteShippingAddressData ) && !empty ($ billingAddress )) {
74
76
$ sameAsBillingFlag = $ quote ->getCustomerId () &&
75
- $ this ->checkIfShippingAddressMatchesWithBillingAddress ($ shippingAddress , $ billingAddress );
77
+ $ this ->checkIfShippingAddressMatchesWithBillingAddress ($ shippingAddress , $ billingAddress );
78
+ } else {
79
+ $ sameAsBillingFlag = 0 ;
76
80
}
77
81
78
82
if ($ sameAsBillingFlag ) {
You can’t perform that action at this time.
0 commit comments