<?php
/**
 * Warranty Cart Uninstall
 *
 * @package WarrantyCart
 */

// Prevent direct access.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
	exit;
}

// Check if uninstall is requested.
if ( ! defined( 'WARRANTY_CART_UNINSTALL' ) || ! WARRANTY_CART_UNINSTALL ) {
	return;
}

// Delete plugin options.
delete_option( 'warranty_cart_settings' );
delete_option( 'warranty_cart_activated' );

// Delete transients.
delete_transient( 'warranty_cart_temp_data' );

// Clean up any custom database tables if they exist.
// Note: This plugin doesn't create custom tables, but this is where you would add cleanup code.

// Clear any cached data.
wp_cache_flush();

// Note: We don't delete WooCommerce products or orders created by this plugin
// as they may contain important customer data. Manual cleanup may be required.
