How to update Magento order status without triggering notification email?

How to update Magento order status without triggering notification email?

September 25, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How to update Magento order status without triggering notification email?

Updating Magento Order Status Without Sending Notifications

As a senior developer working on e-commerce platforms like Magento, you often face situations where you need to update order status programmatically without triggering unnecessary notification emails to customers. This is especially crucial when performing system-level updates or integrations that don’t require customer intervention.

Let’s dive into the issue at hand and provide a practical solution for updating order status in Magento 2 without sending emails.

The Problem: Current Approach Doesn’t Work

The current approach you’re trying involves adding a new status history comment to the order. You’ve attempted to set isVisibleOnFront and isCustomerNotified to false, hoping this would prevent the system from sending a customer notification email:

$historyItem = $order->addStatusHistoryComment('some comment', 'complete');
$historyItem->setIsVisibleOnFront(false);
$historyItem->setIsCustomerNotified(false);
$historyItem->save();
$order->save();

However, this approach doesn’t work as expected because Magento’s core logic for sending notifications is tied to the order status update event, not the history item creation.

The Solution: Bypassing the Notification System

To achieve your goal of updating order status without triggering email notifications, you need to bypass Magento’s default notification system. Here’s a step-by-step approach:

  1. Prevent the ‘sales_order_status_change’ event from firing: Magento uses this event to trigger the notification emails. You can prevent it from firing using an observer.

    First, create an observer file in your custom module. For example, you could put it in app/code/Vendor/Module/etc/events.xml:

    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
        <event name="sales_order_status_change">
            <observer name="vendor_module_skip_notification" instance="Vendor\Module\Observer\SkipNotificationObserver"/>
        </event>
    </config>
    
  2. Create the observer class: In your observer file, create a class that implements Magento\Framework\Event\ObserverInterface. This class will be responsible for preventing the event from further execution.

    use Magento\Framework\Event\Observer;
    use Magento\Framework\Event\ObserverInterface;
    
    class SkipNotificationObserver implements ObserverInterface
    {
        public function execute(Observer $observer)
        {
            // Check if this is a relevant order update (e.g., for specific status changes)
            if ($this->isRelevantOrderUpdate($observer)) {
                return false;  // Prevent event from further execution
            }
    
            return true;
        }
    
        private function isRelevantOrderUpdate(Observer $observer)
        {
            // Add your logic here to determine if this order update requires skipping notifications
            // For example, you could check the new status or any other relevant conditions
    
            return false;  // Placeholder for your logic
        }
    }
    
  3. Perform the order status update: After preventing the notification event, perform your order status update as usual.

Conclusion: A Clean Solution for Magento Order Status Updates

Updating order status in Magento without triggering email notifications requires a strategic approach that bypasses the default system logic. By using an observer to prevent the sales_order_status_change event from firing and implementing custom logic within the observer, you can achieve your goal efficiently.

Remember that this solution should be used judiciously. Only apply it for specific cases where customer notification is not required, such as internal order status changes or integration-related updates.

For more advanced Magento development techniques and best practices, feel free to explore our resources at LaravelCompany. We provide comprehensive guides on Magento 2 development to help you master the platform effectively.

Magento 2 Email Orders Customers

Our network