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)
153153 $ addresses [] = $ this ->customerAddressRepository ->getById (
154154 $ quote ->getBillingAddress ()->getCustomerAddressId ()
155155 );
156+ }
157+ if ($ quote ->getShippingAddress ()->getCustomerAddressId ()) {
158+ $ addresses [] = $ this ->customerAddressRepository ->getById (
159+ $ quote ->getShippingAddress ()->getCustomerAddressId ()
160+ );
156161 } else {
157162 $ billingAddress = $ quote ->getBillingAddress ();
158163 $ customerAddress = $ this ->customerAddressFactory ->create ();
@@ -166,11 +171,6 @@ public function validateAddresses(QuoteEntity $quote)
166171 $ customerAddress ->setCustomAttributes ($ billingAddress ->getCustomAttributes ());
167172 $ addresses [] = $ customerAddress ;
168173 }
169- if ($ quote ->getShippingAddress ()->getCustomerAddressId ()) {
170- $ addresses [] = $ this ->customerAddressRepository ->getById (
171- $ quote ->getShippingAddress ()->getCustomerAddressId ()
172- );
173- }
174174
175175 foreach ($ addresses as $ address ) {
176176 $ validator = $ this ->validatorFactory ->createValidator ('customer_address ' , 'save ' );
You can’t perform that action at this time.
0 commit comments