WooCommerce Bookings cart inactive time
-
Hello!
I have the WooCommerce Bookings plugin installed and set so the user must request confirmation before the booking becomes live. When a user clicks to check availability of a time slot it adds the bookable product to the users cart even before they have filled out any personal information. The default time that the product stays in their cart is 15 minutes, meaning that if a user clicks a time slot with no real intention of filling out the confirmation request, that time slot is unavailable to everyone viewing the site for 15 minutes (and sometimes longer as the system is not particularly reliable at cleaning the cart – maybe a cron issue?).
The guys at Woo have confirmed this is standard behavior and briefly touched on the way the system works, and also pointed out that they can’t help with customisation. That being said the way the system is setup by default just isn’t a fit for the site currently, 15 minutes is simply too long to have a time slot unavailable.
Here is what I was told by Woo:
“The 15 minute time-out could be adjusted using the Bookings provided filter named woocommerce_bookings_remove_inactive_cart_time – you can see how the default timestamp is built by viewing the filter in source code in wp-content/plugins/woocommerce-bookings/includes/class-wc-booking-cart-manager.php` on line 155.”
Unfortunately this just isn’t enough information for me to understand how to go about changing this setting. I have changed the line that is mentioned in the source code – in the file “wc-booking-cart-manager.php” (obviously not a permanent solution) but even so that does not appear to change anything.
Any ideas how to implement this change as a filter as suggested? Or any other way to safely make this change in an update-friendly way?
Many thanks!
- The topic ‘WooCommerce Bookings cart inactive time’ is closed to new replies.