From 379586de65feeb61611725f6381e183098702d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20D=C3=ADaz?= Date: Tue, 17 Aug 2021 10:52:10 +0200 Subject: [PATCH] Update Index.php Save changes to the order addresses --- Controller/Adminhtml/Edit/Index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Controller/Adminhtml/Edit/Index.php b/Controller/Adminhtml/Edit/Index.php index 02193f5..ce3391a 100755 --- a/Controller/Adminhtml/Edit/Index.php +++ b/Controller/Adminhtml/Edit/Index.php @@ -139,6 +139,11 @@ public function execute() $order->addStatusHistoryComment($comment); $order->setCustomerEmail($emailAddress); $this->orderRepository->save($order); + + foreach ($order->getAddressesCollection() as $address) + { + $address->setEmail($emailAddress)->save(); + } } //if update customer email