Skip to content
Cancel "on hold" orders after a certain number of days or by hours
PHP JavaScript CSS
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Bump 1.2.1 Feb 24, 2018
assets NEW / The plugin can work in hours Oct 2, 2018
includes NEW / Order status hook for the cancel process May 7, 2019
languages Bump 1.4.0 Oct 2, 2018
.gitignore gitignore DS Store Oct 28, 2017 Bump 1.6.1 Jun 4, 2019
LICENSE.txt Add extension licence files Oct 30, 2017 Bump 1.6.0 May 7, 2019
readme.txt Bump 1.6.1 Jun 4, 2019
uninstall.php NEW / Class Updater for modifications Oct 2, 2018
woo-cancel-abandoned-order.php Bump 1.6.1 Jun 4, 2019

WooCommerce Cancel Abandoned Order


Cancel "on hold" orders after a certain number of days or by hours



WooCommerce Cancel Abandoned Order allows you to add a small option that will take care of dealing with "abandoned" commands.

If you have check or transfer type orders for example, you will be able to set a maximum number of days or by hours to receive the payment.

WooCommerce Cancel Abandoned Order, will take care of checking this and change the status of the order to "Cancel" if you have not received payment on time.


This section describes how to install the plugin and get it working.

  1. Upload the plugin files to the /wp-content/plugins/woo-cancel-abandoned-order directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. By default you can control the orders on the payment gateways: Check and BACS. Go to the options of the payment pages on WooCommerce.

To add another payment gateway, simply use the woo_cao_gateways filters, more information on the Wiki


  • PHP minimal: 7.0
  • WordPress minimal: 4.0
  • WooCommerce minimal : 2.2



  • woo_cao_cancel_order ($order_id) : After cancel order.
  • woo_cao_restock_item ($product_id, $old_stock, $new_stock, $order, $product ) : After restock product.


  • woo_cao_gateways : Adds a payment gateway for the control.
  • woo_cao_date_order ($old_date, $gateway, $mode) : Change the calculation date for pending orders.
  • woo_cao_default_hours : Default value of the number of hours for order processing.
  • woo_cao_default_days : Default value of the number of days for order processing.
  • woo_cao_statustocancel ($status) : Allows you to add or change which WooCommerce order status the plugin should cancel.


Frequently Asked Questions

What does the plugin do?

Depending on the options defined in the payment gateway options page, the system will cancel orders whose payments have not been received.


You can cancel orders in hours or days. For example, if I put the mode "Hourly", I can cancel orders pending after 2 hours. Another example, in mode "Daily", I can cancel orders that I have not received payment within 7 days.

The execution of the cleaning is done like this: Mode "hourly": every hour to 00 minutes Mode "Daily": every day at 0:00


If you checked the box to enable this feature in the gateway, the system will restock each product line of the abandoned order.

I would like to cancel orders pending payment

Follow the tutorial here to change the status of orders to cancel. By default the "on-hold" commands are canceled.


You can’t perform that action at this time.