PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 2.15
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v2.15
5.6.0 5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 3.0.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.51 3.0.60 3.0.61 3.0.62 3.0.70 3.0.71 3.0.72 All 35 releases
double-opt-in / compatibility / avada / AvadaFormSubmit.class.php

AvadaFormSubmit.class.php in Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification 2.15, at compatibility/avada/AvadaFormSubmit.class.php

64 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace forge12\contactform7\CF7DoubleOptIn {
4 if (!defined('ABSPATH')) {
5 exit;
6 }
7
8 if (class_exists('\Fusion_Form_Submit')) {
9 /**
10 * Class Frontend
11 * Responsible to handle the frontend of the Double OptIn
12 *
13 * @package forge12\contactform7\CF7DoubleOptIn
14 */
15 class AvadaFormSubmit extends \Fusion_Form_Submit
16 {
17 /**
18 * Proces nonce, recaptcha and similar checks.
19 * Dies if checks fail.
20 *
21 * @access protected
22 * @since 3.1.1
23 * @return void
24 */
25 protected function pre_process_form_submit() {
26 // Verify the form submission nonce.
27 //check_ajax_referer( 'fusion_form_nonce', 'fusion_form_nonce' );
28
29 // If we are in demo mode, just pretend it has sent.
30 if ( apply_filters( 'fusion_form_demo_mode', false ) ) {
31 die( wp_json_encode( $this->get_results_from_message( 'success', 'demo' ) ) );
32 }
33
34 // Check reCAPTCHA response and die if error.
35 $this->check_recaptcha_response();
36 }
37
38 /**
39 * Ajax callback for 'send to email' submission type.
40 *
41 * @access public
42 * @return void
43 * @since 3.1
44 */
45 public function submit($formID, $sendmail_args)
46 {
47 $this->pre_process_form_submit();
48
49 // Checks nonce, recaptcha and similar. Dies if checks fail.
50 $data = $this->get_submit_data();
51
52 $sendmail = $this->submit_form_to_email($data);
53
54 if ($sendmail) {
55 $fusion_forms = new \Fusion_Form_DB_Forms();
56 $fusion_forms->increment_submissions_count($formID);
57
58 return true;
59 }
60 return false;
61 }
62 }
63 }
64 }