This commit is contained in:
2026-07-02 15:54:39 -06:00
commit 9883323161
17470 changed files with 4470592 additions and 0 deletions
@@ -0,0 +1,32 @@
<?php
/**
* Uninstall - explicit teardown of the plugin's own data. The Gravity Forms
* Add-On Framework removes its settings and feeds; we drop our transaction table
* and options. Fails safe - a teardown error never blocks uninstalling.
*
* @package ESP\Instanda
*/
declare(strict_types=1);
if (!defined('WP_UNINSTALL_PLUGIN')) {
exit;
}
try {
global $wpdb;
$table = $wpdb->prefix . 'esp_instanda_transactions';
// Table name is a trusted internal constant, not user input.
$wpdb->query("DROP TABLE IF EXISTS {$table}");
delete_option('espinstanda_db_version');
delete_option('espinstanda_operating_mode_audit');
// Clear any scheduled cleanup 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());
}
}