| @@ -724,12 +724,12 @@ | ||
| 724 | 724 | } else if ( is_array( $params['dates_to_check'] ) ) { |
| 725 | 725 | |
| 726 | 726 | $start_day_number = 1; |
| 727 | 727 | |
| 728 | - $today_inix_timestamp = strtotime( $params['dates_to_check'][0] . ' 00:00:00' ); // '2023-09-03 00:00:00' | |
| 728 | + $today_inix_timestamp = strtotime( $params['dates_to_check'][0] . ' 00:00:00 UTC' ); // '2023-09-03 00:00:00' | |
| 729 | 729 | |
| 730 | - $dif_in_days = strtotime( $params['dates_to_check'][ ( count( $params['dates_to_check'] ) - 1 ) ] . ' 00:00:00' ) | |
| 731 | - - strtotime( $params['dates_to_check'][0] . ' 00:00:00' ); | |
| 730 | + $dif_in_days = strtotime( $params['dates_to_check'][ ( count( $params['dates_to_check'] ) - 1 ) ] . ' 00:00:00 UTC' ) | |
| 731 | + - strtotime( $params['dates_to_check'][0] . ' 00:00:00 UTC' ); | |
| 732 | 732 | |
| 733 | 733 | $dif_in_days = $dif_in_days / ( 24 * 60 * 60 ); |
| 734 | 734 | $params['max_days_count'] = ceil( $dif_in_days ) + 1; |
| 735 | 735 | } |
| @@ -959,11 +959,20 @@ | ||
| 959 | 959 | |
| 960 | 960 | // ===================================================================================================== |
| 961 | 961 | // Change over days = |
| 962 | 962 | // ===================================================================================================== |
| 963 | + $is_booking_used_check_in_out_time = null; | |
| 964 | + if ( function_exists( 'wpbc_settings_calendar__preview_is_changeover_enabled' ) ) { | |
| 965 | + $is_booking_used_check_in_out_time = wpbc_settings_calendar__preview_is_changeover_enabled( $resource_id, $params['request_uri'] ); | |
| 966 | + } | |
| 967 | + if ( null === $is_booking_used_check_in_out_time ) { | |
| 968 | + $is_booking_used_check_in_out_time = ( | |
| 969 | + ( function_exists( 'wpbc_is_booking_used_check_in_out_time' ) ) | |
| 970 | + && ( wpbc_is_booking_used_check_in_out_time( $params['request_uri'], $resource_id ) ) | |
| 971 | + ); | |
| 972 | + } | |
| 963 | 973 | if ( |
| 964 | - ( function_exists( 'wpbc_is_booking_used_check_in_out_time' ) ) | |
| 965 | - && ( wpbc_is_booking_used_check_in_out_time( $params[ 'request_uri' ], $resource_id ) ) | |
| 974 | + $is_booking_used_check_in_out_time | |
| 966 | 975 | && ( ! $availability_per_day[ $my_day_tag ][ $resource_id ]->is_day_unavailable ) // And this date still free false |
| 967 | 976 | ) { |
| 968 | 977 | |
| 969 | 978 | /** |