It happens at times when you stand in need to block a few days mostly public holidays from your booking calendar. In those scenarios, certain days can be selectively stopped from appearing on your booking calendar with the WooCommerce Booking and Appointment Plugin. In this post we are going to see how to prevent booking on certain dates with WooCommerce.
Blocking Dates with WooCommerce Booking & Appointment Plugin: Admin Experience
We will take the example of Spa appointments for this post.
The first step will be creating your appointment product. You can do that from the Products -> Add Product link. On the same page, you would also find the Booking meta box that allows you to setup your appointment. Then you have to do some general booking settings.
Under the “Booking options” tab, I have selected the Enable Booking Date. Under Select Booking Method, I have selected Recurring Weekdays. And all Booking Days are also selected.
Once this is done, there is an option called Enable Booking Time in the “Booking Options” tab. You need to enable this in order to add time slots.
The Price for the time slot field will let you add different prices for each time slot. I have already entered the price in the product settings and hence I left this field empty to avoid multiple calculations. You just have to set the From time & To time for each time slot and you are done.
The checkbox “Make unavailable for other products once lockout is reached” is left unchecked. It is used for cases where we have a single person providing multiple services. We will explore that in a different blog post.
Once you have added your time slots, you will need to click on the “Update” button.
All your time slots will be displayed in the Manage Dates, Time Slots tab. In our case, a total of 14 time slots were created.
The next thing you want to do is block the dates. For that, go to Booking Meta Box-> Settings and then in the third field you can add the dates that you want to block for booking.
In case you want to block certain dates for all your products, you can do that globally by going to Bookings-> Settings and you will see the field for blocking days. You just have to select the dates from the calendar and save the changes.
Since this is a “Simple Product”, there aren’t any specific settings under the product data section. You just have to enter the basic details like the Regular price and Sale price. This will be used for all time slots.
Finally, the field names that appear on the frontend can be changed. Go to Bookings -> Settings -> Booking Labels and change the names. Once you are done, save the changes.
Blocking Dates with WooCommerce Booking & Appointment Plugin: User Experience
Once the above setup is created, the product page on frontend looks like below:
When you click on the calendar icon, it shows a monthly view and all the dates that were added in the blocked section are seen lighter than the rest and the user won’t be able to select those dates indeed serving the purpose.
Blocking dates is really important because there are days when the service won’t be available and an appointment system should be capable of that. It could be days like Christmas, New Year or any particular date. WooCommerce Booking And Appointment Plugin provides a complete solution for a bookable product.
This setup is exactly similar to creating time slots with recurring weekdays. The only difference is that we added blocked dates or holidays in this one. If you are a beginner it will take you 15 minutes to get this up.