PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.6.3
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.6.3
5.6.2 5.6.3 5.6.1 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 All 38 releases
← All changes | src/Frontend/ErrorNotification.php +14 -1 5.3.2 → 5.6.3 View file →
@@ -81,12 +81,25 @@
81 81 'code' => $error->getCode(),
82 82 'message' => $error->getMessage(),
83 83 'form_id' => $formId,
84 84 'time' => time(),
85 - 'hide_confirmation' => (bool) apply_filters( 'f12_cf7_doubleoptin_show_validation_error', false ),
85 + 'hide_confirmation' => $error->shouldShowToVisitor( $formId ),
86 86 ),
87 87 self::TRANSIENT_TTL
88 88 );
89 + }
90 +
91 + /**
92 + * Drop the stored error for the current client.
93 + *
94 + * For integrations that already put the message into the form's own
95 + * response (CF7 abort, Elementor error). Without this the toast shows
96 + * the same sentence a second time next to it.
97 + *
98 + * @return void
99 + */
100 + public static function forget(): void {
101 + delete_transient( self::getTransientKey() );
89 102 }
90 103
91 104 /**
92 105 * Retrieve and delete the stored error for the current client.