<?php
/**
 * ShopCentral Uninstall
 *
 * This file is called when the plugin is uninstalled.
 * It is responsible for cleaning up all plugin data from the database.
 */

defined('WP_UNINSTALL_PLUGIN') || exit;

global $wpdb;

// 1. Delete Options
delete_option('shopcentral_version');
delete_option('shopcentral_install_tracked');
delete_option('shopcentral_activation_redirect');

// 2. Delete Transients (if any)
$wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_shopcentral_%'");
$wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE '_site_transient_shopcentral_%'");

