PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.6.2
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.6.2
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 | OnUpdate.php +20 -0 5.1.6 → 5.6.2 View file →
@@ -185,8 +185,23 @@
185 185 'plugin' => 'double-opt-in',
186 186 ] );
187 187 }
188 188
189 + if ( version_compare( $currentVersion, '5.6.0' ) < 0 ) {
190 + $logger->info( 'Updating to version 5.6.0 (adds follow-up status table)', [
191 + 'plugin' => 'double-opt-in',
192 + 'current' => $currentVersion,
193 + 'target' => '5.6.0',
194 + ] );
195 +
196 + // New table only. Opt-ins confirmed before this version get no
197 + // rows and are shown as "no status recorded" — deliberately not
198 + // replayed, which would re-send historic mails.
199 + \Forge12\DoubleOptIn\Repository\FollowUpSchema::install();
200 +
201 + update_option( FORGE12_OPTIN_SLUG . '_version', '5.6.0' );
202 + }
203 +
189 204 // Safety net: Ensure both tables always exist regardless of stored version.
190 205 // Handles edge cases such as database migrations, manual file uploads, or
191 206 // restored backups that are missing the custom tables.
192 207 global $wpdb;
@@ -206,8 +221,13 @@
206 221 $auditTable = $wpdb->prefix . 'f12_cf7_doubleoptin_audit_log';
207 222 if ( $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $auditTable ) ) !== $auditTable ) {
208 223 $logger->warning( 'Audit log table missing – recreating.', [ 'plugin' => 'double-opt-in', 'table' => $auditTable ] );
209 224 createTableAuditLog();
225 + }
226 +
227 + if ( ! \Forge12\DoubleOptIn\Repository\FollowUpSchema::isCurrent() ) {
228 + $logger->warning( 'Follow-up table missing or outdated – running dbDelta.', [ 'plugin' => 'double-opt-in' ] );
229 + \Forge12\DoubleOptIn\Repository\FollowUpSchema::install();
210 230 }
211 231
212 232 // Always pin the stored version to the live plugin version. The
213 233 // version_compare ladder above only writes the target of the last