<?php
/**
 * TryOnCloud - AI Virtual TryOn for WooCommerce
 * Uninstall script — runs when the plugin is deleted from WordPress Admin.
 *
 * WordPress calls this file directly when the store owner clicks Delete on the Plugins page.
 * It does NOT run on deactivation — only on full uninstall (delete).
 */

// Security: abort if this file is called directly or not during a real uninstall.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    exit;
}

// Remove all plugin options from the database.
$options = array(
    'aivt_api_url',
    'aivt_api_key',
    'aivt_button_text',
    'aivt_button_position',
    'aivt_theme_color',
    'aivt_btn_border_radius',
    'aivt_btn_padding_v',
    'aivt_btn_padding_h',
    'aivt_btn_font_size',
    'aivt_btn_font_weight',
    'aivt_btn_font_family',
    'aivt_enabled_categories',
    'aivt_enabled_products',
    'aivt_terms_url',
    'aivt_privacy_url',
    'aivt_max_tryons_per_user',
    'aivt_limit_period',
    'aivt_debug_mode',
);

foreach ( $options as $option ) {
    delete_option( $option );
}
