<?php
/**
 * Uninstall handler — runs when the plugin is deleted via the WordPress admin.
 *
 * Removes all plugin data from the database.
 *
 * @package SmartPaymentGatewayControl
 */

// Security: only run when WordPress triggers uninstall.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
	exit;
}

// Remove all plugin data.
delete_option( 'spgc_rules' );
delete_option( 'spgc_license_key' );
delete_site_option( 'spgc_rules' );
delete_site_option( 'spgc_license_key' );