Also – if we’re setting it to 1 day, it’s not possible to make a reservation at 11:00 if the current time is 15:00 when making reservation. How do we fix this?
It’s not convenient that our customers can’t make a reservation just because it’s not exactly 24 hours later then current time.
“At least 1 day in advance” should not be 24 hours but the day after.
Hi Sebastian,
The following Gist is a mini-plugin that adds late bookings options for 2, 3 and 4 days in advance:
https://gist.github.com/NateWr/c8b86771e979a06b1afb
To use this, click the Download Gist button and unpack the .zip file. Open the .php file it produces in a text editor and then modify the following line:
$sap->pages['rtb-settings']->sections['rtb-schedule']->settings['late-bookings']->options['2880'] = __( 'At least 2 days in advance', 'restaurant-reservations' );
Set the 2880 to the number of minutes you’d like to use for the late bookings settings. So for 12 hours it would be 12 * 60 = 720. Then save the file, upload it to your /wp-content/plugins/ directory and activate it from your WordPress Plugins menu.
Currently the plugin doesn’t support blocking same-day reservations (allowing bookings any time the following day regardless of the current time). I’ve added it as a feature request here, which you can follow if you want to know when it gets implemented.
https://github.com/NateWr/restaurant-reservations/issues/63
I haven’t had many requests for this though I can see how it would be useful.
If you have coding skills or are willing to pay a developer to implement this for you, it would be fairly straightforward. You’ll need to hook into the rtb_validate_booking_submission hook to perform additional validation checks on a booking:
https://github.com/NateWr/restaurant-reservations/blob/master/includes/Booking.class.php#L432
This Gist shows a simple usage of the rtb_validate_booking_submission hook to add a special check on the phone number. A coder could use this example to perform additional checks on the date/time of the booking:
https://gist.github.com/NateWr/fedafb0be1989b4a0893