Bookings are created only when order has been placed, and not before?

Hello there,

I have noticed that bookings are created before order has been placed on the checkout page.

This will be highly problematic as it is common for users (in any shopping workflow) to get to the checkout page and then not finish the process, for whatever reason. This scenario should not create a booking.

How can I change this to ensure that bookings are created only when order has been placed, and not before?

Kind regards,

Jovica

Hi,

This is the way it should work by default to prevent two bookings from being created at the same time. You can adjust this by deleting the Unpaid status in HivePress > Settings > Bookings > Blocking Statuses and setting a minimum period in Expiration Period and Storage Period. As another option, we can provide a PHP snippet to auto-delete such unpaid bookings once every 1 hour, for example. Let me know if this works for you.

Thanks, Andrii,

This has generated a flurry of “booking cancelled” emails for bookings that were not real booking to begin with.

I guess that I could override booking cancellation email to stop those, but that will stop legitimate cancellation emails too.

Am I missing something here?

Kind regards,

Jovica

Hi,

Yes, bookings in “draft” status are temporary and auto-deleted depending on the expiration and storage period you set. I can provide a snippet to prevent cancellation emails for such emails only — please let me know if this works for you. There may also be a way to auto-delete these bookings more often, but this would require further customizations.

Thanks, Ihor, that snippet would be very useful.

Please try using the code snippet suggested here Unpaid Booking Management - #28 It should prevent the cancellation emails.