| @@ -1,4 +1,4 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @version 1.0 |
| 4 | 4 | * @package Booking Calendar |
| @@ -290,11 +290,11 @@ | ||
| 290 | 290 | * @return mixed false | array( $fields_count, $fields_matches ) |
| 291 | 291 | */ |
| 292 | 292 | function wpbc_get_fields_from_booking_form( $booking_form = '' ){ |
| 293 | 293 | |
| 294 | - if ( empty( $booking_form ) ) { | |
| 295 | - $booking_form = get_bk_option( 'booking_form' ); | |
| 296 | - } | |
| 294 | + if ( empty( $booking_form ) ) { | |
| 295 | + $booking_form = function_exists( 'wpbc_get__booking_form_fields__configuration' ) ? wpbc_get__booking_form_fields__configuration( wpbc_get_default_resource(), 'standard' ) : ''; | |
| 296 | + } | |
| 297 | 297 | |
| 298 | 298 | $types = 'text[*]?|email[*]?|time[*]?|textarea[*]?|select[*]?|selectbox[*]?|checkbox[*]?|radio|acceptance|captchac|captchar|file[*]?|quiz'; |
| 299 | 299 | $fields_data = wpbc_get_booking_form_shortcode_fields_by_types( $booking_form, $types ); |
| 300 | 300 | $fields_count = $fields_data[0]; |
| @@ -330,10 +330,10 @@ | ||
| 330 | 330 | * @return mixed false | array( $fields_count, $fields_matches ) |
| 331 | 331 | */ |
| 332 | 332 | function wpbc_get_select_checkbox_fields_from_booking_form( $booking_form = '' ){ |
| 333 | 333 | |
| 334 | - if ( empty( $booking_form ) ) | |
| 335 | - $booking_form = get_bk_option( 'booking_form' ); | |
| 334 | + if ( empty( $booking_form ) ) | |
| 335 | + $booking_form = function_exists( 'wpbc_get__booking_form_fields__configuration' ) ? wpbc_get__booking_form_fields__configuration( wpbc_get_default_resource(), 'standard' ) : ''; | |
| 336 | 336 | |
| 337 | 337 | $types = 'select[*]?|selectbox[*]?|checkbox[*]?|radio[*]?'; // FixIn: 8.1.3.7. |
| 338 | 338 | $fields_data = wpbc_get_booking_form_shortcode_fields_by_types( $booking_form, $types ); |
| 339 | 339 | $fields_count = $fields_data[0]; |