File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
app/code/Magento/Quote/Model Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,11 @@ public function validateAddresses(QuoteEntity $quote)
153
153
$ addresses [] = $ this ->customerAddressRepository ->getById (
154
154
$ quote ->getBillingAddress ()->getCustomerAddressId ()
155
155
);
156
+ }
157
+ if ($ quote ->getShippingAddress ()->getCustomerAddressId ()) {
158
+ $ addresses [] = $ this ->customerAddressRepository ->getById (
159
+ $ quote ->getShippingAddress ()->getCustomerAddressId ()
160
+ );
156
161
} else {
157
162
$ billingAddress = $ quote ->getBillingAddress ();
158
163
$ customerAddress = $ this ->customerAddressFactory ->create ();
@@ -166,11 +171,6 @@ public function validateAddresses(QuoteEntity $quote)
166
171
$ customerAddress ->setCustomAttributes ($ billingAddress ->getCustomAttributes ());
167
172
$ addresses [] = $ customerAddress ;
168
173
}
169
- if ($ quote ->getShippingAddress ()->getCustomerAddressId ()) {
170
- $ addresses [] = $ this ->customerAddressRepository ->getById (
171
- $ quote ->getShippingAddress ()->getCustomerAddressId ()
172
- );
173
- }
174
174
175
175
foreach ($ addresses as $ address ) {
176
176
$ validator = $ this ->validatorFactory ->createValidator ('customer_address ' , 'save ' );
You can’t perform that action at this time.
0 commit comments