| @@ -259,8 +259,29 @@ | ||
| 259 | 259 | $wpdb->esc_like('_transient_timeout_thinkrank_pro_') . '%' |
| 260 | 260 | ) |
| 261 | 261 | ); |
| 262 | 262 | // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching |
| 263 | + | |
| 264 | + // Names the wildcards above cannot reach (#918). | |
| 265 | + // | |
| 266 | + // The usage tracker stores the deactivation survey under | |
| 267 | + // `wpins_deactivation_{reason,details}_{plugin}`, which `wpins_thinkrank_%` | |
| 268 | + // misses. Named exactly: widening to `wpins_%` would delete the state of | |
| 269 | + // every other plugin that ships the same telemetry SDK. | |
| 270 | + foreach (['wpins_deactivation_reason_thinkrank', 'wpins_deactivation_details_thinkrank'] as $option) { | |
| 271 | + delete_option($option); | |
| 272 | + } | |
| 273 | + | |
| 274 | + // Search Console caches that versions before 2.14.2 wrote under unprefixed | |
| 275 | + // names (2.14.2 moved them to the `thinkrank_` prefix, see #918). | |
| 276 | + // They expire within three days of the upgrade, but uninstalling inside | |
| 277 | + // that window would otherwise leave the site's search queries behind. | |
| 278 | + foreach (['7d', '30d', '90d', '14d', '60d', '180d'] as $range) { | |
| 279 | + delete_transient('analytics_dashboard_v5_' . $range); | |
| 280 | + } | |
| 281 | + foreach (['7d', '30d', '90d'] as $range) { | |
| 282 | + delete_transient('seo_opportunities_' . $range); | |
| 283 | + } | |
| 263 | 284 | } |
| 264 | 285 | |
| 265 | 286 | /** |
| 266 | 287 | * Remove user meta data |