Create a new booking product

Install and activate the Bookings for WooCommerce plugin. Ensure that you have WooCommerce activated as well.

Click Product > Add New

Give your product a name and add a description in the same way that you would for a normal WooCommerce product. In the Product Data section, choose Booking for the product type. You’ll see some new options appear.

Use the following options to configure your booking:

  • Booking units
    The booking unit is the basic duration unit that your booking is measured in. Choose from either day, night, or week.
  • Booking start day
    If you wish, you can specify a day of the week that each booking must start on. This works well if you are renting a property that always has the same check-in / check-out days.
  • Minimum and maximum booking lengths
    You can define minimum and maximum durations for bookings. These are measured in the same unit as the main booking unit so if you’ve chosen days, then you will be defining minimum and maximum booking lengths in days too.
  • Buffer period
    You can enter a value here to add an optional buffer period between bookings. Buffer periods are always measured in days.
  • Standard cost
    In the standard cost field, enter the default cost per booking unit. If your standard cost is $50 per night, ensure you have chosen ‘night’ as your booking unit and enter 50 in this field. If your standard cost is $275 per week, ensure you choose ‘week’ as the booking unit and enter 275 here.
  • Last bookable date
    You can set a date here as the last date that you are taking bookings. If you only want to take bookings up to the end of the year, use the calendar in this field to select the date. You can change it at a future date if you’re ready to take bookings beyond this date.
  • Non Standard Costs
    Click the ‘Add Date Range’ to set a new date range where you might be charging more or less than the standard cost. You can add as many date ranges as you like. If any dates overlap in date ranges then ranges that are higher in this list will take priority over ones lower down. You can drag and drop ranges if you wish.
    Non standard date ranges are designed to allow you flexibility in pricing. Maybe you want to charge more over holiday periods; or you want to charge less during quiet times.
    You can also make some dates unavailable in the calendar. Perhaps you have a villa that you want to use yourself for a couple of weeks. Just add a new date range and enter 0 as the cost to block it out in the calendar and prevent it being booked.

When you’ve set up your product, click Publish and it’s live.

How to make dates unavailable

Maybe there are some dates that you don’t want to make your property or facility available. You can block out dates where bookings can’t be made by adding non standard date ranges with a cost of 0. This will prevent these dates from being selected as a start or end date. Please note that you will need to book out time either side of the blocked dates if your booking duration is longer than one unit.

To make some dates unavailable, use the ‘Non Standard Costs’ field. Click on ‘Add Date Range’ to create a new row, then add the first and last dates that you want your property to be unavailable. Enter cost as 0.

How to set up a weekly booking

In this scenario, we’ll set up a weekly booking that runs from a set day (in this instance, Thursday). There’s a one day buffer period which means that the booking will end on a Wednesday.

Set up your booking product according to this guidance.

Choose Thursday in the ‘Bookings start’ field. Obviously, if you want your booking to start on a different day, choose that.

If you want to ensure that the booking finishes on a Wednesday, enter 1 as the buffer period. If you’re happy for one booking to finish on the same day that the next one starts, you can leave the Buffer period field empty.

That’s it. Enter your costs and other parameters as you wish. When the user goes to book, they’ll only be able to choose your selected start day for the check-in, and the designated end day for the check-out.

How to allow bookings on the weekend only

You can make your property available for weekend rental only by setting the start date and the maximum booking length.

For example, if you would like bookings to start on a Friday and end on a Sunday:

  • Set the ‘Booking unit’ to night
  • Set the ‘Bookings start’ field to ‘Friday’
  • Set the ‘Max booking length’ to 2

Users will only be able to start their booking on Friday and will have to end it by Sunday. If you would like to ensure that they can’t book a single night, then set the ‘Min booking length’ to 2 as well.

Filters for Bookings for WooCommerce

Bookings for WooCommerce has a number of filters available for developers to extend the plugin:

bfwc_booking_not_permitted Update the error message when a user makes a booking that isn’t permitted

bfwc_filter_scheduled_deletion_duration Time in minutes before an unpaid booking is deleted

bfwc_filter_added_to_cart_message Message displayed to user when they add a booking to their cart

bfwc_filter_validation_fail_parameters Message displayed when a booking is missing details

bfwc_filter_validation_fail_booking_exists Message when a user tries to add a booking with a blocked date

bfwc_filter_validation_fail_booking_exists Message when booking parameters are not valid

bfwc_filter_check_in_placeholder Filter the ‘Check in’ label in the calendar

bfwc_filter_check_out_placeholder Filter the ‘Check out’ label in the calendar

bfwc_filter_unit_labels Change the day, night, week labels

bfwc_add_to_cart_text Change the ‘Book Now’ text on the add to cart button

Change the ‘Check In’ and ‘Check Out’ labels

It’s straightforward to change the check in / check out headings. Just add this to your child theme functions.php file:

function my_bfwc_filter_check_in_placeholder( $label ) {
$label = 'Start rental';
return $label;
}
add_filter( 'bfwc_filter_check_in_placeholder', 'my_bfwc_filter_check_in_placeholder' );
function my_bfwc_filter_check_out_placeholder( $label ) {
$label = 'End rental';
return $label;
}
add_filter( 'bfwc_filter_check_out_placeholder', 'my_bfwc_filter_check_out_placeholder' );
view raw check-in-label.php hosted with ❤ by GitHub

Integrating with Product Extras for WooCommerce

Product Extras is aWooCommerce product addons plugin – allowing you to configure your products with additional fields and options. It integrates with Bookings for WooCommerce, meaning you can add extra chargeable items to your booking products.

WooCommerce booking addons

Follow the guidance for Product Extras to install and create new options in your product. Note that the Bookings plugin adds an extra option for your Product Extras fields – the ability to charge addon items by booking unit (i.e. per night, per day, or per week) or as a flat rate charge.

WooCommerce charge addon by booking duration