blueprint3d / module-change-order-email
Lets admins change or correct the customer email address on an existing Magento 2 order, with safe handling of matching customer accounts.
Package info
github.com/BluePrint3D-Dev/module-change-order-email
Language:HTML
Type:magento2-module
pkg:composer/blueprint3d/module-change-order-email
Requires
- php: >=8.1.0 <8.6.0
- magento/framework: *
- magento/module-backend: *
- magento/module-customer: *
- magento/module-sales: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A Magento 2 admin module that lets store staff correct the customer email address on an existing order directly from the order view page — no database access required.
🛑 The Problem
Customers regularly place orders with a mistyped email address, and out of the box Magento gives admins no safe way to fix it. The email on an order is tied to the customer record it was placed under, so a naive edit can silently detach the order from its account or collide with an email already used by someone else.
🛠️ The Solution
This module adds an "Edit Order Email" button to the admin order view page. Submitting a new address updates the order (and the customer account, if the order belongs to one) safely:
- If the new email is unused, or already belongs to the same customer, the order and customer record are updated immediately.
- If the new email already belongs to a different customer, the admin is asked to confirm before the order is moved to that customer's account.
- Guest orders are updated in place with no customer account changes.
Every change is recorded as a comment in the order's status history, noting the old/new email, the customer_id involved, and which admin user made the change.
✨ Features
- In-Context Editing: Edit the order email without leaving the order view page.
- Guest & Customer Safe: Correctly handles guest orders, matching accounts, and conflicting accounts differently.
- Confirmation Step: Never silently reassigns an order to another customer — always requires explicit confirmation.
- Full Audit Trail: Logs every email change to the order's status history, including which admin made it.
- Sales Grid Aware: Keeps the sales_order_grid email column in sync with the change.
📦 Installation
1. Install via Composer
composer require blueprint3d/module-change-order-email
2. Enable the module
php bin/magento module:enable BluePrint3D_ChangeOrderEmail
3. Run setup upgrade
php bin/magento setup:upgrade
4. Compile and flush cache
php bin/magento setup:di:compile
php bin/magento cache:flush
👨💻 Usage
Open any order in Sales > Orders, click Edit Order Email in the page header, enter and confirm the new email address, and submit. If the new address already belongs to another customer, you'll be prompted to confirm moving the order to that customer before the change is applied.
📜 License
Copyright © 2026 BluePrint3D Ltd. All rights reserved.
This software is provided free of charge for personal or commercial use. However, the resale, redistribution, or sublicensing of this source code, modified or unmodified, for direct financial gain is strictly prohibited.
Please see the LICENSE.txt file for full terms and conditions.
Owned by: BluePrint3D Ltd (Company Registration Number: 13473806)
Email: support@blueprint3d.dev