File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
app/code/Magento/Customer/Model/Resource Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -202,21 +202,15 @@ protected function _saveAddresses(\Magento\Customer\Model\Customer $customer)
202
202
}
203
203
}
204
204
}
205
- //@TODO: find appropriate place
206
205
$ changedAddresses = [];
207
- if ($ defaultBillingId != $ customer ->getData ('default_billing ' )) {
208
- $ changedAddresses ['default_billing ' ] = $ customer ->getData ('default_billing ' );
209
- }
210
- if ($ defaultShippingId != $ customer ->getData ('default_shipping ' )) {
211
- $ changedAddresses ['default_shipping ' ] = $ customer ->getData ('default_shipping ' );
212
- }
213
- if ($ changedAddresses ) {
214
- $ this ->_getWriteAdapter ()->update (
215
- $ this ->getTable ('customer_entity ' ),
216
- $ changedAddresses ,
217
- $ this ->_getWriteAdapter ()->quoteInto ('entity_id = ? ' , $ customer ->getId ())
218
- );
219
- }
206
+
207
+ $ changedAddresses ['default_billing ' ] = $ customer ->getData ('default_billing ' );
208
+ $ changedAddresses ['default_shipping ' ] = $ customer ->getData ('default_shipping ' );
209
+ $ this ->_getWriteAdapter ()->update (
210
+ $ this ->getTable ('customer_entity ' ),
211
+ $ changedAddresses ,
212
+ $ this ->_getWriteAdapter ()->quoteInto ('entity_id = ? ' , $ customer ->getId ())
213
+ );
220
214
221
215
return $ this ;
222
216
}
You can’t perform that action at this time.
0 commit comments