Unlimited bookings per same day(s) for specific booking resource(s)

Deprecated for Update 9.8 or newer

By default option "Allow unlimited bookings per same day(s)" from Advanced section of Booking > Settings General page is working for all booking resources. What's if you need to activate this for specific booking resource(s).

By default its does not possible to configure this via settings in the Booking Calendar You need to make source code customization for having this functionality.

For example, let you having the booking resources with following ID:

- ID = 3 "Resource A" ( after booking having days as unavailable )
- ID = 4 "Resource B" (need to have option " Allow unlimited bookings per same day(s) " - days always available )
- ID = 5 "Resource C" (need to have option " Allow unlimited bookings per same day(s) " - days always available )

Please open this file ../wp-content/plugins/{Booking Calendar Folder}/core/lib/wpdev-booking-class.php
( you can check how to edit files in WordPress menu in this article https://wpbookingcalendar.com/faq/how-edit-file-in-wp-menu/ )

then find this code:

********************************

        $booking_is_days_always_available = get_bk_option( 'booking_is_days_always_available' );
//        if ( strpos($_SERVER['REQUEST_URI'],'page=wpbc-new') !== false ) { $booking_is_days_always_available = 'On'; }
        // if ( in_array( $bk_type, array( '12', '15', '17' ) ) ) $booking_is_days_always_available = 'On';     // Set  dates in calendar always available only  for specific resources with specific ID

********************************

and replace it to this code:

********************************

        $booking_is_days_always_available = get_bk_option( 'booking_is_days_always_available' );
//        if ( strpos($_SERVER['REQUEST_URI'],'page=wpbc-new') !== false ) { $booking_is_days_always_available = 'On'; }
if ( in_array( $bk_type, array( '4', '5' ) ) ) $booking_is_days_always_available = 'On';     // Set  dates in calendar always available only  for specific resources with specific ID

********************************

Of course, if you have the different ID (than 3 and 4) of such booking resources you need to make fixes in the code: array( '4', '5' ) .

Also at the Booking > Settings General page in calendar section, you need to be sure that these options was unchecked:
- "Use pending days as available"
- "Allow unlimited bookings per same day(s)"

Disclaimer. Please note, if you will modify the source code of the Booking Calendar, we will not guaranteed the correct work of plugin and do not support it.