query( "DROP TABLE IF EXISTS {$wpdb->prefix}mintall_api_keys" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}mintall_connections" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery // "_" is a LIKE wildcard; unescaped, this would match other plugins' keys. $wpdb->query( "DELETE FROM {$wpdb->postmeta} WHERE meta_key LIKE '\\_mintall\\_%'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery delete_option( 'mintall_keep_db_version' ); delete_option( 'mintall_keep_disconnected' ); delete_option( 'mintall_keep_reauth_required' ); delete_option( 'mintall_keep_setup_dismissed' ); delete_option( 'mintall_keep_auto_protect' ); delete_option( 'mintall_keep_auto_protect_enabled_at' ); delete_option( 'mintall_keep_visibility_on_protect' ); delete_option( 'mintall_keep_page_view_capture' ); delete_option( 'mintall_keep_settings' ); // Legacy name; never written by current versions. // OAuth state transients have random suffixes, so they go by pattern. delete_transient( 'mintall_bulk_mint_ids' ); delete_transient( 'mintall_keep_pvc_backoff' ); $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\\_transient\\_mintall\\_oauth\\_%' OR option_name LIKE '\\_transient\\_timeout\\_mintall\\_oauth\\_%'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery // Legacy hooks from the pre-queue pipeline. wp_clear_scheduled_hook( 'mintall_keep_periodic_sync' ); wp_clear_scheduled_hook( 'mintall_keep_retry_certificate_fetch' ); } if ( is_multisite() ) { $mintall_keep_site_ids = get_sites( [ 'fields' => 'ids', 'number' => 0, ] ); foreach ( $mintall_keep_site_ids as $mintall_keep_site_id ) { switch_to_blog( $mintall_keep_site_id ); mintall_keep_uninstall_site(); restore_current_blog(); } } else { mintall_keep_uninstall_site(); }