PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 2.7.0
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v2.7.0
2.7.0 2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 All 43 releases
← All changes | includes/elementor/modules/optin/actions/utils/ajax-handler.php +12 -2 1.5.12.7.0 View file →
@@ -76,15 +76,25 @@
76 76
77 77 return;
78 78 }
79 79
80 - $post_id = filter_input( INPUT_POST, 'post_id' );
81 - $form_id = filter_input( INPUT_POST, 'form_id' );
80 + $post_id = filter_input( INPUT_POST, 'post_id' );
81 + $form_id = filter_input( INPUT_POST, 'form_id' );
82 + $funnel_page_id = filter_input( INPUT_POST, 'sellkit_current_page_id', FILTER_SANITIZE_NUMBER_INT );
82 83
83 84 $this->form_data = $_POST; // @codingStandardsIgnoreLine
84 85
85 86 $post_elements = Elementor::$instance->documents->get( $post_id )->get_elements_data();
86 87 $this->form = self::find_form_recursive( $post_elements, $form_id );
88 + $funnel = Sellkit_Funnel::get_instance( $funnel_page_id );
89 +
90 + if ( 'sales-page' === $funnel->current_step_data['type']['key'] ) {
91 + $this
92 + ->add_response( 'errors', esc_html__( 'Opt-in widget should not be used in the sales page step.', 'sellkit' ) )
93 + ->set_success( false );
94 +
95 + wp_send_json_error( $this->response );
96 + }
87 97
88 98 $this
89 99 ->validate_form()
90 100 ->fill_form_settings()