PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.13.0
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.13.0
5.12.0 5.13.0 5.13.1 5.11.0 5.10.0 5.9.0 5.8.0 5.8.1 5.7.0 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 All 47 releases
← All changes | OnUpdate.php +29 -0 5.7.0 → 5.13.0 View file →
@@ -200,8 +200,37 @@
200 200
201 201 update_option( FORGE12_OPTIN_SLUG . '_version', '5.6.0' );
202 202 }
203 203
204 + if ( version_compare( $currentVersion, '5.8.0' ) < 0 ) {
205 + $logger->info( 'Updating to version 5.8.0 (adds confirmation mail status columns)', [
206 + 'plugin' => 'double-opt-in',
207 + 'current' => $currentVersion,
208 + 'target' => '5.8.0',
209 + ] );
210 +
211 + // mail_status / mail_error / mail_status_at. Existing rows keep an
212 + // empty status ("recorded before 5.8"), nothing is back-filled.
213 + createTableOptin();
214 +
215 + update_option( FORGE12_OPTIN_SLUG . '_version', '5.8.0' );
216 + }
217 +
218 + if ( version_compare( $currentVersion, '5.12.0' ) < 0 ) {
219 + $logger->info( 'Updating to version 5.12.0 (adds form_ref column)', [
220 + 'plugin' => 'double-opt-in',
221 + 'current' => $currentVersion,
222 + 'target' => '5.12.0',
223 + ] );
224 +
225 + // form_ref tells two forms on the same page apart. Existing rows
226 + // keep an empty value and stay tied to the whole form; nothing is
227 + // guessed or back-filled.
228 + createTableOptin();
229 +
230 + update_option( FORGE12_OPTIN_SLUG . '_version', '5.12.0' );
231 + }
232 +
204 233 // Safety net: Ensure both tables always exist regardless of stored version.
205 234 // Handles edge cases such as database migrations, manual file uploads, or
206 235 // restored backups that are missing the custom tables.
207 236 global $wpdb;