prefix . 'esp_instanda_transactions'; // Table name is a trusted internal constant, not user input. $wpdb->query("DROP TABLE IF EXISTS {$table}"); // Remove EVERY plugin option and transient - including the encrypted Test password // and its self-provisioned key - so no recoverable secret survives uninstall. $opt = $wpdb->esc_like('espinstanda_') . '%'; $tr = '_transient_' . $wpdb->esc_like('espinstanda_') . '%'; $trt = '_transient_timeout_' . $wpdb->esc_like('espinstanda_') . '%'; $wpdb->query($wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s OR option_name LIKE %s", $opt, $tr, $trt )); // Clear any scheduled events that may still be queued. wp_clear_scheduled_hook('esp_instanda_cleanup'); } catch (\Throwable $e) { if (function_exists('error_log')) { error_log('ESP INSTANDA uninstall: ' . $e->getMessage()); } }