PluginProbe
Booking Calendar / 11.8.4
Booking Calendar v11.8.4
11.8.4 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 All 204 releases
← All changes | includes/page-setup/setup_ajax.php +21 -13 11.611.8.4 View file →
@@ -1,4 +1,4 @@
1 1 <?php /**
2 2 * @version 1.0
3 3 * @description Ajax and Requests Structure for WPBC_AJX__Setup__Ajax_Request
4 4 * @category Setup Class
@@ -366,21 +366,29 @@
366 366 }
367 367
368 368 }
369 369
370 - $setup_steps->db__set_step_as_completed( 'bookings_types' );
371 - if ( ! empty( $cleaned_data ) ) {
372 - wpbc_setup_wizard__set_full_screen_mode_for_current_user( true );
373 - $data_arr['current_step'] = wpbc_setup_wizard__get_first_profile_step();
374 - $current_steps_arr = $setup_steps->get_steps_arr();
375 - $setup_steps->db__reset_steps_from( $data_arr['current_step'] );
376 - if (
377 - isset( $current_steps_arr[ $data_arr['current_step'] ] )
378 - && 'manual_save_required' === $setup_steps->get_step_save_behavior( $data_arr['current_step'] )
379 - ) {
380 - $setup_steps->db__set_step_as_saved( $data_arr['current_step'], false );
381 - }
382 - $data_arr['redirect_url'] = $setup_steps->get_step_target_url( $data_arr['current_step'] );
370 + $setup_steps->db__set_step_as_completed( 'bookings_types' );
371 + if ( ! empty( $cleaned_data ) ) {
372 + $data_arr['current_step'] = wpbc_setup_wizard__get_first_profile_step();
373 + $current_steps_arr = $setup_steps->get_steps_arr();
374 + $is_form_builder_handoff = array( 'form_structure' ) === wpbc_setup_wizard__get_profile_route();
375 +
376 + if ( $is_form_builder_handoff ) {
377 + // Form Builder is the fifth and final temporary Setup step.
378 + $setup_steps->db__set_step_as_completed( 'form_structure' );
379 + wpbc_setup_wizard__set_full_screen_mode_for_current_user( false );
380 + } else {
381 + wpbc_setup_wizard__set_full_screen_mode_for_current_user( true );
382 + $setup_steps->db__reset_steps_from( $data_arr['current_step'] );
383 + if (
384 + isset( $current_steps_arr[ $data_arr['current_step'] ] )
385 + && 'manual_save_required' === $setup_steps->get_step_save_behavior( $data_arr['current_step'] )
386 + ) {
387 + $setup_steps->db__set_step_as_saved( $data_arr['current_step'], false );
388 + }
389 + }
390 + $data_arr['redirect_url'] = $setup_steps->get_step_target_url( $data_arr['current_step'] );
383 391 $data_arr['steps'] = $current_steps_arr;
384 392 $cleaned_request_params['do_action'] = 'redirect_to_setup_step';
385 393 }
386 394 break;