• Resolved demiultility

    (@demiultility)


    Hi dear,

    I would like to block today and tomorrow for new reservations. (The first possible date to add a reservation is 2 days later from now it will be the 1st of march).
    How can I block these days in the form?

    I hope you can help me.

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

    (@natewr)

    Hi @demiultility,

    Are you comfortable working with some PHP code? If so, this gist shows how to add a new option to the late bookings setting:

    https://gist.github.com/NateWr/d0bc04cd4206e4ab84e3fe1a99db08f3

    It adds an option for 2 hours (120 minutes). But if you change the value to the number of minutes in 2 days, it should do what you want.

    Thread Starter demiultility

    (@demiultility)

    Dear NateWR,

    Thank you for the information. Unfortunately I am not really familiar with php…
    I made a new php file which I called “custom-late-booking-for-rtb.php” and inserted the code in there.

    I don’t know if that’s the right way to do it?

    Best regards,

    Demi

    Thread Starter demiultility

    (@demiultility)

    And also if I choose the option “At least 24 hours in advance” instead of Block-same day bookings it doesn’t work. I can still book 12 hours in advance…

    NateWr

    (@natewr)

    Hi Demi,

    Yes, you’re almost there. Now that you’ve created a new PHP file, you’ll need to change one line of the code that you’ve created:

    https://gist.github.com/NateWr/d0bc04cd4206e4ab84e3fe1a99db08f3#file-custom-late-booking-for-rtb-php-L27

    Change the value 120 to the number of minutes you want to block. So two days is 48 hours * 60 minutes = 2880. And then you might want to change the description from “At least 2 hours in advance” to “At least 2 days in advance”.

    Once you’ve done that, you can upload the .php file to your /wp-content/plugins/ directory, then activate the plugin from the Plugins list in your WordPress admin area. You should then see the new option appear under Bookings > Settings > Schedule.

    To test out the scheduling restrictions, you need to log out as an admin. Admins and Bookings Managers are exempt from these restrictions, so as long as you’re logged in they won’t be applied to you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘First reservation date after 2 days’ is closed to new replies.