Spread the love

At Geometrical Web, we often build custom solutions for real-world travel businesses using WordPress. One recent request came from a client using the Traveller theme by ShineTheme, which powers many tour and travel booking websites.

Their requirement was simple — yet crucial for smooth operations:

If two users have already booked a particular tour date, no one else should be able to book that same date again.

This led us to build a lightweight plugin that smartly disables the “Book Now” button on fully booked dates. Here’s how we made it work.

The Problem

The Traveller theme doesn’t restrict the number of bookings per date by default. So if a tour only supports 2 bookings per date, there’s a high risk of overbooking — especially when multiple users are browsing at the same time.

We needed to:

  • Track how many bookings exist per tour date.

  • Check if the selected checkout date is fully booked.

  • Disable the booking form if 2 or more bookings already exist.

  • Give users clear feedback on why the form is disabled.

The Solution

We created a custom plugin that works seamlessly with the Traveller theme’s booking system.

How it works:

  1. Fetch bookings from the database:
    The plugin runs on single tour pages only and checks how many bookings exist for each check_in date using the postmeta data tied to the tour’s item_id.

  2. Detect fully booked dates:
    If 2 or more bookings exist for a date, that date is considered fully booked.

  3. Inject JavaScript & CSS:
    We localize the fully booked dates array into a JavaScript variable using wp_localize_script(). This script then monitors the user’s selected checkout date.

  4. Disable the booking form dynamically:
    When the user picks a fully booked date from the calendar, the form is disabled with a .disabled-book class and a message appears.

Live in action:

If a user selects a fully booked date like 05 June 2025, here’s what happens:

  • The form becomes semi-transparent.

  • The “Book Now” button is disabled.

  • A message appears saying: “This date is fully booked.”

Here’s the visual cue:

css
.disabled-book .date-wrapper::after {
content: "This date is fully booked";
color: red;
font-size: 13px;
font-weight: bold;
}

Easy to Install

You can now install this feature as a simple plugin on any WordPress site using the Traveller theme.

Plugin Name: Fully Booked Checkout Disabler

  • Lightweight

  • No settings panel needed

  • Automatically runs only on tour pages

  • Customizable threshold (default is 2 bookings per date)

Want This for Your Travel Website?

If you’re using the Traveller theme or any booking-based WordPress theme and want to avoid overbookings, we’ve made this plugin available for download.

Contact us if you’d like us to install and configure it for your custom site — or integrate more advanced features like:

  • Dynamic booking limits

  • AJAX validation

  • Admin reports on booking status

Final Thoughts

This plugin is a simple example of how small tweaks can make a huge difference in user experience and operations for travel businesses.

If you’re running a Himachal trekking tour, a Spiti bike trip, or a Char Dham yatra — you can finally rest assured that overbooking won’t ruin your schedule.