1. Home
  2. Knowledge Base
  3. Bookings for WooCommerce
  4. Display single calendar
  1. Home
  2. Knowledge Base
  3. Advanced
  4. Display single calendar

Display single calendar

If your bookable products are for a single day, you can opt to hide the ‘Check out’ calendar. The user can then select the day of their booking from a single calendar.

Note that your ‘Booking unit’ must be set to ‘Day’.

To enable this, just add the following snippet:

* Display a single calendar
* Only for use with single day bookings
function prefix_auto_set_end( $auto, $product_id ) {
return 'yes';
add_filter( 'bfwc_auto_set_end', 'prefix_auto_set_end', 10, 2 );

Here’s how to add the snippet.

Was this article helpful?

Related Articles