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