| @@ -4,10 +4,8 @@ | ||
| 4 | 4 | |
| 5 | 5 | use Jet_Form_Builder\Actions\Action_Handler; |
| 6 | 6 | use Jet_Form_Builder\Actions\Events\Default_Process\Default_Process_Event; |
| 7 | 7 | use Jet_Form_Builder\Actions\Events\Default_Required\Default_Required_Event; |
| 8 | -use Jet_Form_Builder\Admin\Tabs_Handlers\Tab_Handler_Manager; | |
| 9 | -use Jet_Form_Builder\Admin\Tabs_Handlers\Options_Handler; | |
| 10 | 8 | use Jet_Form_Builder\Classes\Tools; |
| 11 | 9 | use Jet_Form_Builder\Exceptions\Action_Exception; |
| 12 | 10 | use Jet_Form_Builder\Exceptions\Handler_Exception; |
| 13 | 11 | use Jet_Form_Builder\Exceptions\Not_Router_Request; |
| @@ -30,16 +28,15 @@ | ||
| 30 | 28 | * Define Jet_Engine_Booking_Forms_Handler class |
| 31 | 29 | */ |
| 32 | 30 | class Form_Handler { |
| 33 | 31 | |
| 34 | - public $hook_key = 'jet_form_builder_submit'; | |
| 35 | - public $hook_val = 'submit'; | |
| 36 | - public $form_data = array(); | |
| 37 | - public $response_data = array(); | |
| 38 | - public $is_ajax = false; | |
| 39 | - public $is_success = false; | |
| 40 | - public $response_args = array(); | |
| 41 | - public $user_journey_data = array(); | |
| 32 | + public $hook_key = 'jet_form_builder_submit'; | |
| 33 | + public $hook_val = 'submit'; | |
| 34 | + public $form_data = array(); | |
| 35 | + public $response_data = array(); | |
| 36 | + public $is_ajax = false; | |
| 37 | + public $is_success = false; | |
| 38 | + public $response_args = array(); | |
| 42 | 39 | |
| 43 | 40 | public $form_id; |
| 44 | 41 | public $refer; |
| 45 | 42 | public $manager; |
| @@ -46,12 +43,11 @@ | ||
| 46 | 43 | |
| 47 | 44 | /** @var Action_Handler */ |
| 48 | 45 | public $action_handler; |
| 49 | 46 | |
| 50 | - public $form_key = '_jet_engine_booking_form_id'; | |
| 51 | - public $refer_key = '_jet_engine_refer'; | |
| 52 | - public $post_id_key = '__queried_post_id'; | |
| 53 | - public $user_journey_key = '_user_journey'; | |
| 47 | + public $form_key = '_jet_engine_booking_form_id'; | |
| 48 | + public $refer_key = '_jet_engine_refer'; | |
| 49 | + public $post_id_key = '__queried_post_id'; | |
| 54 | 50 | /** |
| 55 | 51 | * @var Request_Handler |
| 56 | 52 | */ |
| 57 | 53 | public $request_handler; |
| @@ -60,9 +56,8 @@ | ||
| 60 | 56 | /** |
| 61 | 57 | * Constructor for the class |
| 62 | 58 | */ |
| 63 | 59 | public function __construct() { |
| 64 | - $this->set_jfb_request_args(); | |
| 65 | 60 | $this->action_handler = new Action_Handler(); |
| 66 | 61 | $this->request_handler = new Request_Handler(); |
| 67 | 62 | } |
| 68 | 63 | |
| @@ -101,11 +96,8 @@ | ||
| 101 | 96 | ), |
| 102 | 97 | $this->post_id_key => array( |
| 103 | 98 | 'callback' => array( Tools::class, 'set_current_post' ), |
| 104 | 99 | ), |
| 105 | - $this->user_journey_key => array( | |
| 106 | - 'callback' => array( $this, 'set_user_journey_data' ), | |
| 107 | - ), | |
| 108 | 100 | ) |
| 109 | 101 | ); |
| 110 | 102 | } |
| 111 | 103 | |
| @@ -122,17 +114,9 @@ | ||
| 122 | 114 | jet_fb_context()->make_secure( $name ); |
| 123 | 115 | } |
| 124 | 116 | } |
| 125 | 117 | |
| 126 | - public function set_user_journey_data( $data ) { | |
| 127 | - $this->user_journey_data = $data; | |
| 128 | - } | |
| 129 | 118 | |
| 130 | - public function get_user_journey_data() { | |
| 131 | - return $this->user_journey_data; | |
| 132 | - } | |
| 133 | - | |
| 134 | - | |
| 135 | 119 | public function set_referrer( $url ): Form_Handler { |
| 136 | 120 | $refer = remove_query_arg( |
| 137 | 121 | array( 'values', 'status', 'fields' ), |
| 138 | 122 | esc_url_raw( $url ) |
| @@ -394,20 +378,8 @@ | ||
| 394 | 378 | |
| 395 | 379 | return $rich->get_parser(); |
| 396 | 380 | default: |
| 397 | 381 | return null; |
| 398 | - } | |
| 399 | - } | |
| 400 | - | |
| 401 | - public function set_jfb_request_args() { | |
| 402 | - $options_handler = new Options_Handler(); | |
| 403 | - $options_handler->set_jfb_request_args(); | |
| 404 | - $options = Tab_Handler_Manager::get_options( 'options-tab' ); | |
| 405 | - if ( isset( $options['gfb_request_args_key'] ) ) { | |
| 406 | - $this->hook_key = $options['gfb_request_args_key']; | |
| 407 | - } | |
| 408 | - if ( isset( $options['gfb_request_args_value'] ) ) { | |
| 409 | - $this->hook_val = $options['gfb_request_args_value']; | |
| 410 | 382 | } |
| 411 | 383 | } |
| 412 | 384 | |
| 413 | 385 | } |