Magento 2 Auto Cancel Order

Table of Content

  1. Extension Installation Guide
  2. Configuration
  3. Order Status in Backend
  4. Auto Order Cancellation Email to Admin


  1. Extension Installation
    • Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
    • Login to your SSH and run below commands step by step:
      • php bin/magento setup:upgrade
      • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
      • For Magento version 2.2.x & above- php bin/magento setup:static-content:deploy -f
      • php bin/magento cache:flush
    • That’s it.


  1. Configuration
    For configuring the extension, log in to Magento 2, move to Stores > Configuration > Auto Cancel Order where you can find various settings to enable the extension.
  • Auto Cancel Order: Enable auto cancel order extension from here.
  • Auto Cancel Order After X Days: Enter number of days after which you want to auto cancel orders.
  • Apply on Order Status: Select to auto cancel orders having the selected order status.
  • Apply on Payment Methods: Select to auto cancel orders placed using the selected payment methods.
  • Send Mail To: Select the Email receiver for auto cancel order notification.
  • Email Template:  Select template to send auto cancel order notification Email to admin.



  1. Order Status in Backend
    All the order with the order status listed under Sales > Orders. You can see how order status gets changed after auto order cancellation.

    • Order status before auto cancellation


  • Order status after auto cancellation


  1. Auto Order Cancellation Email to Admin
    Immediately after orders get canceled, based on selected order statuses and payment methods, admin gets an Email notification having order IDs listed which were canceled after the specified time period. An example is shown below: