File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/code/Magento/Customer/Model Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -318,23 +318,23 @@ public function _construct()
318
318
public function getDataModel ()
319
319
{
320
320
$ customerData = $ this ->getData ();
321
+ $ addressesData = [];
321
322
if (isset ($ customerData ['entity_id ' ]) && !isset ($ this ->storedAddress [$ customerData ['entity_id ' ]])) {
322
- $ addressesData = [];
323
323
/** @var \Magento\Customer\Model\Address $address */
324
324
foreach ($ this ->getAddresses () as $ address ) {
325
325
$ addressesData [] = $ address ->getDataModel ();
326
326
}
327
327
$ this ->storedAddress [$ customerData ['entity_id ' ]] = $ addressesData ;
328
328
} elseif (isset ($ customerData ['entity_id ' ], $ this ->storedAddress [$ customerData ['entity_id ' ]])) {
329
- $ customerData = $ this ->storedAddress [$ customerData ['entity_id ' ]];
329
+ $ addressesData = $ this ->storedAddress [$ customerData ['entity_id ' ]];
330
330
}
331
331
$ customerDataObject = $ this ->customerDataFactory ->create ();
332
332
$ this ->dataObjectHelper ->populateWithArray (
333
333
$ customerDataObject ,
334
334
$ customerData ,
335
335
\Magento \Customer \Api \Data \CustomerInterface::class
336
336
);
337
- $ customerDataObject ->setAddresses ($ customerData )
337
+ $ customerDataObject ->setAddresses ($ addressesData )
338
338
->setId ($ this ->getId ());
339
339
return $ customerDataObject ;
340
340
}
You can’t perform that action at this time.
0 commit comments