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 | uninstall.php +18 -0 5.1.5 → 5.6.3 View file →
@@ -75,8 +75,15 @@
75 75 'table_name' => $wpTableName,
76 76 ] );
77 77 }
78 78
79 +function drop_table_followup() {
80 + global $wpdb;
81 +
82 + // Follow-up status only references opt-ins; it goes with them.
83 + $wpdb->query( "DROP TABLE IF EXISTS " . esc_sql( $wpdb->prefix . 'f12_cf7_doubleoptin_followup' ) );
84 +}
85 +
79 86 if ( should_keep_data_on_uninstall() ) {
80 87 Logger::getInstance()->info( 'Uninstall: keeping opt-in data (keep_data_on_uninstall enabled).', [
81 88 'plugin' => 'double-opt-in',
82 89 ] );
@@ -84,8 +91,9 @@
84 91 Logger::getInstance()->info( 'Uninstall: deleting opt-in data (keep_data_on_uninstall disabled by admin).', [
85 92 'plugin' => 'double-opt-in',
86 93 ] );
87 94 drop_table_categories();
95 + drop_table_followup();
88 96 drop_table_optin();
89 97 }
90 98
91 99 // Purely operational options with no value after removal. Admin-set config
@@ -92,4 +100,14 @@
92 100 // (f12-doi-settings) is intentionally left in place, and cross-package options
93 101 // (bundle-pro licence, addon settings) are owned by their own uninstallers.
94 102 delete_option( 'f12_cf7_doubleoptin_installed_at' );
95 103 delete_option( 'f12_cf7_doubleoptin_installation_uuid' );
104 +delete_option( 'f12_cf7_doubleoptin_telemetry_counters' );
105 +
106 +// The daily telemetry job is no longer scheduled, but an installation that ran
107 +// an older version still carries the event. Uninstalling has to take it with
108 +// it, otherwise the entry outlives the plugin in the WP-Cron table.
109 +wp_clear_scheduled_hook( 'f12_cf7_doubleoptin_daily_telemetry' );
110 +wp_clear_scheduled_hook( 'f12_doi_follow_up_sweep' );
111 +// Retry events carry the opt-in id as argument; only unschedule_hook
112 +// removes them regardless of arguments.
113 +wp_unschedule_hook( 'f12_doi_follow_up_retry' );