Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 3ae0785

Browse files
committed
Filter the import to make sure we only update fields present in the import file.
- magento/magento2#11968 - Importing a import file to update customer data, results in entity fields being removed if the columns are not present on the imported file.
1 parent d6c6e66 commit 3ae0785

File tree

1 file changed

+6
-0
lines changed
  • app/code/Magento/CustomerImportExport/Model/Import

1 file changed

+6
-0
lines changed

app/code/Magento/CustomerImportExport/Model/Import/Customer.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ protected function _saveCustomerEntities(array $entitiesToCreate, array $entitie
277277
return $this;
278278
}
279279

280+
/**
281+
* Filter the entity that are being updated so we only change fields found in the importer file
282+
*
283+
* @param array $entitiesToUpdate
284+
* @return array
285+
*/
280286
private function getCustomerEntityFieldsToUpdate(array $entitiesToUpdate): array
281287
{
282288
$firstCustomer = reset($entitiesToUpdate);

0 commit comments

Comments
 (0)