diff --git a/vendor/magento/module-customer/Controller/Adminhtml/Index/Edit.php b/vendor/magento/module-customer/Controller/Adminhtml/Index/Edit.php index 25b4ddd4e1732..5095b03cc2197 100644 --- a/vendor/magento/module-customer/Controller/Adminhtml/Index/Edit.php +++ b/vendor/magento/module-customer/Controller/Adminhtml/Index/Edit.php @@ -33,15 +33,6 @@ public function execute() $customer = $this->_customerRepository->getById($customerId); $customerData['account'] = $this->customerMapper->toFlatArray($customer); $customerData['account'][CustomerInterface::ID] = $customerId; - try { - $addresses = $customer->getAddresses(); - foreach ($addresses as $address) { - $customerData['address'][$address->getId()] = $this->addressMapper->toFlatArray($address); - $customerData['address'][$address->getId()]['id'] = $address->getId(); - } - } catch (NoSuchEntityException $e) { - //do nothing - } } catch (NoSuchEntityException $e) { $this->messageManager->addException($e, __('Something went wrong while editing the customer.')); $resultRedirect = $this->resultRedirectFactory->create();