Reading list Switch to dark mode

    Magento 2 Auto Cancel Order

    Updated 3 April 2024

    Magento 2 Auto Cancel Order using this module the store-owners can perform automated order cancellation for orders placed.

    With specific order statuses like pending and processing only by setting up a required order duration(set up cron).

    Moreover, the admin and the customer both will receive an auto-generated copy of the order cancellation email.

    Firstly, the module is very helpful in saving the time of the store-owners by excluding them to manually cancel each and every order.

    At instances involving any technical glitches like web store crash or an uncertain error in the payment gateway. Secondly, at the same time providing instant feedback to the customers via email for those order cancellations.

    Searching for an experienced
    Magento 2 Company ?
    Find out More

    Check the plugin setup flow –



    • Enable/Disable from the back-end.
    • Saves the time and effort of manually cancelling orders.
    • The Admin can choose order status Pending and Processing or either one of it for cancellation.
    • The Cron Automatically cancels the order based on selected order status.
    • Choose the email template for both the admin and customers email notification.
    • Admin and customer will receive instant order cancelled notification via email.


    Firstly, customers will get a zip folder and they have to extract the contents of this zip folder on their system. Secondly, the extracted folder has an src folder, inside the src folder you have the app folder.

    Further, the admin needs to transfer this app folder into the Magento2 root directory on the server as shown below.


    After the successful installation you have to run these commands in the Magento2 root directory:

    First command –

    php bin/magento setup:upgrade

    Second Command –

    php bin/magento setup:di:compile

    Third Command –

    php bin/magento setup:static-content:deploy

    Fourth Command –

    php bin/magento indexer:reindex

    Right after that flush the cache from Magento admin panel by navigating through->System->Cache management as shown below.



    Configuration of Multi-Lingual

    The admin will navigate through Store > Configuration > General ->Locale Options and select the locale as German (the language into which admin wants to translate his store content).


    Language Translation For Auto Cancel order Module

    If you need to do the module translation, please navigate the following path in your system. app/code/Webkul/AutoCancelOrder/i18n. Open the file named en_US.CSV for editing as shown in below screenshot.


    Once you have opened the file for editing, replace the words after the comma(,) on the right with your translated words.


    After editing the CSV file, save it and then upload it to the same path app/code/Webkul/AutoCancelOrder/i18n. The module will now get translated into your desired language. It supports both the LTR and RTL languages.


    Cron Set up Configuration

    Run these commands for cron –

    php bin/magento cron:install

    Crontab has been generated and saved.

    php bin/magento cron:run

    Run jobs by schedule.

    General Settings

    After the successful installation of the extension, the admin will find the side panel menu option “Auto Order Cancel”. From here, the admin can directly access the initial configuration settings.


    Apart from that, the admin will can also navigate through Stores > Configuration > Auto Order Cancel.

    Now, the admin will first navigate to Stores > Configuration > Webkul >Auto Order Cancel.


    Enable Auto Order Cancel: The admin can enable or disable the auto-cancel order from here.

    Order Status: Using this the admin can choose the order statuses type from the multi-select for which the orders will be auto cancelled.

    Order Cancel Transactional Emails

    The Order Cancel Notification Mail To Admin: The admin is auto-notified for their order cancellations via email notification using this field.

    The Order Cancel Notification Mail to Customer: The customers are auto-notified for their order cancellations via email notification using this field.

    Cron Settings

    Now, the admin can set the cron for Auto Order Cancel.

    cron settings

    Frequency: The admin can set the frequency from the drop-down i.e Daily, Weekly or Monthly.

    Start Time: The admin can set the time duration for cron.

    Now, save the changes by clicking on the Save Config button.


    Firstly, let’s suppose because of an unfortunate event like a technical glitch, crashing of the store’s web page or an error with the payment gateway all the orders placed during this interval get stuck.

    So, now the admin has to manually cancel each and every order.

    Now, the admin can navigate to the Sales>Orders and check all the orders in the list as shown below.

    order list auto order cancel magento 2

    Rather with the help of this module, the admin can set up the cron for last minutes order and save the changes.

    As a result, the admin can check that all the orders of the set-lifetime auto cancelled as shown below and an email for the order cancellation delivered to the customers and admin’s email addresses.

    order -cancelled

    Further, here is the sample image of the email-sent to the customer end for order cancellation.

    Magento 2 order cancellation mail notification to customer

    That’s all for the Magento 2 Auto Cancel Order extension. However, if you still have questions regarding the Magento 2 extensions please create a support ticket by clicking Webkul Support System.

    Current Product Version - 5.0.2-p1

    Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*

    Be the first to comment.

    Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home

    Table of Content