Title: Empty all users&#8217; cart
Last modified: October 6, 2016

---

# Empty all users’ cart

 *  Resolved [antoninartaud](https://wordpress.org/support/users/antoninartaud/)
 * (@antoninartaud)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/empty-all-users-cart/)
 * Hello,
 * The function WC()->cart->empty_cart() allows me to empty the cart of the current
   user
 * But is there way to empty the cart from all users at once ?
 * I sell products which change from day to day. The idea would be to set up a CRON
   which prevents users from having a product from the previous day

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

 *  [con](https://wordpress.org/support/users/conschneider/)
 * (@conschneider)
 * Engineer
 * [9 years, 7 months ago](https://wordpress.org/support/topic/empty-all-users-cart/#post-8258849)
 * Hi there,
 * To my knowledge yes. Go to `/wp-admin/admin.php?page=wc-status&tab=tools` – The
   option ‘Customer Sessions’ has the button ‘Clear all sessions’.
 * This tool will delete all customer session data from the database, including 
   any current live carts. Worth a try(?).
 *  Thread Starter [antoninartaud](https://wordpress.org/support/users/antoninartaud/)
 * (@antoninartaud)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/empty-all-users-cart/#post-8258925)
 * Hello,
 * Thanks for the tip, it doesn’t however seem to empty the carts :/
 * Assuming it works, would there be a way to programmatically press this button?
 *  [anphira](https://wordpress.org/support/users/anphira/)
 * (@anphira)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/empty-all-users-cart/#post-8264388)
 * [@antoninartaud](https://wordpress.org/support/users/antoninartaud/) you may 
   want to look at [https://wordpress.org/plugins/woocommerce-cart-stock-reducer/](https://wordpress.org/plugins/woocommerce-cart-stock-reducer/)
   plugin. I’ve used it before on a site to create a timer which automatically removes
   items from the cart after a set period of time (yes, you can determine the amount
   of time, so you could set the cart to expire after 12 hours for example).
 *  Thread Starter [antoninartaud](https://wordpress.org/support/users/antoninartaud/)
 * (@antoninartaud)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/empty-all-users-cart/#post-8264456)
 * [@anphira](https://wordpress.org/support/users/anphira/) thanks a lot, that plugin
   was exactly what I was looking for, and it killed two birds with one stone !

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

The topic ‘Empty all users’ cart’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [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/)

 * 4 replies
 * 3 participants
 * Last reply from: [antoninartaud](https://wordpress.org/support/users/antoninartaud/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/empty-all-users-cart/#post-8264456)
 * Status: resolved