get_class($error)]); } $steps = [ 'woocommerce' => static function () { vasp_woocommerce_clear(false); }, 'wordpress' => static function () { vasp_wordpress_clear(false); }, 'valuespace' => static function () { vasp_valuespace_clear(); }, ]; foreach ($steps as $integration => $cleanup) { try { $cleanup(); } catch (Throwable $error) { vasp_log('Local integration cleanup failed during deactivation', 'error', ['integration' => $integration, 'exception' => get_class($error)]); } } if (function_exists('vasp_scheduler_cancel_service')) { vasp_scheduler_cancel_service('woocommerce_images'); } if (function_exists('vasp_scheduler_clear')) { vasp_scheduler_clear(VASP_ACTION_RETRY_USER_ACCESS_REVOCATION, null); } if (function_exists('vasp_wc_catalog_shutdown')) { vasp_wc_catalog_shutdown('plugin_deactivation'); } flush_rewrite_rules(); } function vasp_get_plugin_version() { return VASP_VERSION; } function vasp_get_plugin_dir() { return VASP_PLUGIN_DIR; } function vasp_get_plugin_url() { return VASP_PLUGIN_URL; }