PluginProbe
Booking Calendar / 11.8.3
Booking Calendar v11.8.3
11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 10.11.2 All 203 releases
← All changes | includes/_capacity/confirmation.php +18 -6 10.1011.8.3 View file →
@@ -95,8 +95,9 @@
95 95 // =================================================================================================================
96 96
97 97 $replace_arr = wpbc__get_replace_shortcodes__email_new_visitor( $params_arr['booking_id'], $params_arr['resource_id'], $params_arr['form_data'] );
98 98
99 +
99 100 $replace_arr['readable_dates'] = '<div class="wpbc_ty__section_text_dates">'. wpbc_get_redable_dates( $params_arr['dates_ymd_arr'] ) . '</div>';
100 101 $replace_arr['readable_times'] = '';
101 102 if (
102 103 ( wpbc_transform__24_hours_his__in__seconds( $params_arr['times_his_arr'][0] ) > 0 )
@@ -105,8 +106,14 @@
105 106 // -- Times text --
106 107 $replace_arr['readable_times'] = '<div class="wpbc_ty__section_text_times">' . wpbc_get_redable_times( $params_arr['dates_ymd_arr'], $params_arr['times_his_arr'] ) . '</div>';
107 108 }
108 109
110 + $is_no_date = apply_filters( 'wpbc_maybe_no_booking_date', false, $params_arr['dates_ymd_arr'] );
111 + if ( $is_no_date ) {
112 + $replace_arr['readable_dates'] = '<div class="wpbc_ty__section_text_dates">---</div>';
113 + $replace_arr['readable_times'] = '';
114 + }
115 +
109 116 // Top - Thank you
110 117 $title_after_reservation = html_entity_decode( esc_js( wpbc_lang( get_bk_option( 'booking_title_after_reservation' ) ) ) );
111 118 $title_after_reservation = wpbc_replace_booking_shortcodes( $title_after_reservation, $replace_arr, ' --- ' );
112 119 $title_after_reservation = stripslashes( $title_after_reservation );
@@ -206,9 +213,9 @@
206 213 'resource_id' => $params_arr['resource_id'] // '2'
207 214 , 'str_dates__dd_mm_yyyy' => $params_arr['str_dates__dd_mm_yyyy'] // '14.11.2023, 15.11.2023, 16.11.2023, 17.11.2023'
208 215 , 'times_array' => $params_arr['times_array'] // [ ["10","00","00"], ["12","00","00"] ]
209 216 , 'form_data' => $params_arr['form_data'] // 'text^selected_short_timedates_hint4^06/11/2018 14:00...'
210 - , 'is_discount_calculate' => ! true // Default true
217 + , 'is_discount_calculate' => false // FixIn: 10.11.5.7. // Default true
211 218 , 'is_only_original_cost' => false // Default false
212 219 ) );
213 220 $total_cost_without_discount = floatval( $total_cost_without_discount ); // from double > float
214 221
@@ -362,14 +369,14 @@
362 369 }
363 370 }
364 371
365 372
373 + // FixIn: 10.10.3.3.
374 + // // If showing payment form, that we do not make redirection and show Message only.
375 + // if ( ! empty( $confirmation['ty_payment_gateways'] ) ) {
376 + // $confirmation['ty_is_redirect'] = 'message';
377 + // }
366 378
367 - // If showing payment form, that we do not make redirection and show Message only
368 - if ( ! empty( $confirmation['ty_payment_gateways'] ) ) {
369 - $confirmation['ty_is_redirect'] = 'message';
370 - }
371 -
372 379 if ( 'page' == $confirmation['ty_is_redirect'] ) {
373 380
374 381 // FixIn: 9.9.0.3.
375 382 if ( ! empty( $params_arr['ty_url'] ) ) {
@@ -380,8 +387,13 @@
380 387
381 388 $confirmation['ty_url'] = wpbc_make_link_absolute( wpbc_lang( get_bk_option( 'booking_thank_you_page_URL' ) ) ); // '/thank-you'
382 389
383 390 $confirmation['ty_url'] .= ( ( false === strpos( $confirmation['ty_url'], '?' ) ) ? '?' : '&' ) . 'booking_hash=' . $booking_hash;
391 +
392 + // FixIn: 10.10.3.3.
393 + if ( ! empty( $confirmation['ty_payment_gateways'] ) ) {
394 + $confirmation['ty_url'] .= ( ( false === strpos( $confirmation['ty_url'], '?' ) ) ? '?' : '&' ) . 'booking_pay=1';
395 + }
384 396 }
385 397
386 398 } else {
387 399 $confirmation['ty_url'] = '';