Allows to cleanup the orders by various order properties like last changed, status.
Things to consider
- Make sure there is a periodic archive process for DB (or just order details) is in place(why?).
- Consider using Commerce Cart Expiration if the requirement is just to clean the orders that are in cart status.
- Think backup/archive would be a great addition? help to get in
Currently this module provides list of Drush commands to view, delete the orders. See
drush coc --help for more details.
Allows to delete any order type, status and changed date(excluding global max date).
// Delete all cart orders that were changed on or before default changed(set by commerce_order_cleanup_max_date variable)" drush coc // Deletes all the orders in status 'checkout_complete' and changed on or before default changed drush coc --status="checkout_complete" //Deletes all the orders that are changed on or before 2 months before. drush coc --changed="-2 months" // Deletes all the orders that have 'product' line item and changed on or before 01-01-2014 00:00:00 drush coc --type="product" --changed=138853440
As this is a delete operation and can not be undone without backup/restore, made the deletion more strict and expects all filters.
1. Max deletion date per line item type.
2. All 3 filter types (status, changed and line item type) are mandatory.
// List all the orders have line item of type product with status 'checkout_complete' that are changed on or before 2 months. Pass '-y' to delete. drush coc product --status=checkout_complete --changed="-2 months"
Commerce Cart Expiration allows to delete orders in cart.
Want to help?
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Commerce/Advertising, Drush, E-commerce, Performance and Scalability, Utility
- Reported installs: 142 sites currently report using this module. View usage statistics.
- Downloads: 4,290
- Automated tests: Enabled
- Last modified: 22 December 2014
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.