Title: Deactivate Orders Automatically
Last modified: April 10, 2021

---

# Deactivate Orders Automatically

 *  Resolved [mohammadia](https://wordpress.org/support/users/mohammadia/)
 * (@mohammadia)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/deactivate-orders-automatically/)
 * Hello,
 * My woocommerce orders are linked to REST API that provides a license to my customers
   for using the product.
 * I Want to know is there any code that can automatically,that can set the order
   to ‘cancelled’ or ‘pending’ or ‘processing’ after 24 hours or 2 days or a set
   timeframe?
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Rashed Ripon (a11n)](https://wordpress.org/support/users/rur165/)
 * (@rur165)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/deactivate-orders-automatically/#post-14302854)
 * Hello [@mohammadia](https://wordpress.org/support/users/mohammadia/) ,
 * Thanks for reaching out!
 * Out of the box, WooCommerce does not come with such automatic order status change
   based on time. This plugin seems to offer this feature, you can give it a try–
   [Order Status Rules for WooCommerce](https://wordpress.org/plugins/order-status-rules-for-woocommerce/)
 * Alternatively, there are custom coding solution in this discussion – [Automatically change WooCommerce order status after specific time has passed?](https://stackoverflow.com/questions/42422507/automatically-change-woocommerce-order-status-after-specific-time-has-passed)
 * I hope you find the information useful.
 * Thank you 🙂
 *  [laceyrod](https://wordpress.org/support/users/laceyrod/)
 * (@laceyrod)
 * Automattic Happiness Engineer
 * [5 years, 6 months ago](https://wordpress.org/support/topic/deactivate-orders-automatically/#post-14333983)
 * Hi there,
 * I hope the above solutions will work out for you!
 * Since we haven’t heard back from you, and this thread has been inactive for a
   bit, I’m going to mark it as `Resolved` now for the overall health of the forums.
   Please feel free to open a new one if you have any further questions.
 * Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)

 The topic ‘Deactivate Orders Automatically’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3640790)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [laceyrod](https://wordpress.org/support/users/laceyrod/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/deactivate-orders-automatically/#post-14333983)
 * Status: resolved