🦾 You could save time! Try Wendy, the FREE AI WordPress Developer.
We’ve had a few store owners in the WooCommerce Bookings space reach out to us about booking slots being blocked on the calendar due to inactive carts not clearing. This meant other customers were unable to book slots that should be available. This happened because previous In Cart bookings did not automatically delete and were therefore stuck as “unavailable” for new customers.
Stuck In Cart bookings seems to be an issue with WooCommerce Bookings below 1.15.2. We recommend that you follow these steps and then upgrade WooCommerce Bookings to the latest version.
WooCommerce Bookings should only block booking slots for 60 minutes when a customer adds the booking to their cart.
How to clear all In Cart bookings
Luckily clearing In Cart booking slots is quite easy. Head over to the admin sidebar and click WooCommerce > Status > Tools. You’ll then be presented with a range of options. Scroll down to find the “Clear expired In Cart bookings” and click the Clear button.
That’s it. All your expired In Cart bookings will be cleared from the database.
Delete a single In Cart booking
We recommend that you use the “Clear expired In Cart bookings” tool for most cases. However, you can also delete single In Cart bookings manually.
Have a look at the below screenshots as a guide.
Navigate to the In Cart tab under All Bookings then click on the booking ID. You’ll be directed to the edit tab for the selected booking.
Be careful! You could end up deleting an In Cart booking of a customer who is currently in the checkout process.
Double check that the booking is indeed an In Cart booking first, then you can delete it by moving the booking to trash.
WooCommerce cron jobs not working
This is the number one reason why in-cart bookings are not clearing automatically.
How check cron jobs?
If upgrading to the latest WooCommerce Bookings doesn’t fix the issue, then there could be an issue with your WordPress Cron. A Cron job is ( a scheduled event) added for each bookable product that is added to the cart. The Cron job is responsible for deleting the In Cart booking for the set amount of time.
You can use a plugin like Advanced Cron Manager to view and control Cron jobs on your site. You’ll be able to see when an In Cart booking is scheduled to be deleted. Keep an eye on it and you’ll know if your WordPress Cron jobs for WooCommerce bookings are working.
How to fix cron jobs
The fastest and recommend way is to ask your hosting company to look at your WordPress cron jobs. They might be able to fix it for you.
There’s a great post a the WordPress Cron and how to troubleshoot and fix it: https://code.tutsplus.com/articles/insights-into-wp-cron-an-introduction-to-scheduling-tasks-in-wordpress–wp-23119