<?php
/**
 * @package		JooCart
 * @copyright	Copyright (C) 2009 - 2025 softPHP,https://www.soft-php.com
 * @license		GNU/GPL http://www.gnu.org/copyleft/gpl.html
 */
// no direct access
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if(is_admin()){
	if(!defined("WP_UNINSTALL_PLUGIN"))
	exit();
	// delete options
	$id=get_option("joocart_shop_page_id");
	delete_option("joocart_shop_page_id");
	delete_option("joocart_upgrade_download_id");
	delete_option("joocart_order_email");
	delete_option("joocart_opencart_dir_path");
	delete_option("joocart_opencart_dir_url");
	delete_option("joocart_who_can_access_admin");
	delete_option("joocart_use_wordpress_button");
	delete_option("joocart_dont_show_header");
	delete_option("joocart_dont_show_footer");
	delete_option("joocart_dont_show_menus");
	delete_option("joocart_dont_show_admin_login");
	delete_option("joocart_dont_include_jquery");
	delete_option("joocart_use_jquery_dollar");
	delete_option("joocart_dont_show_left_right_column");
	delete_option("joocart_enable_wp_widget_title");
	delete_option("joocart_main_http_server");
	delete_option("joocart_redirect_http_server");
	delete_option("joocart_use_wordpress_db");
	delete_option("joocart_db_user_name");
	delete_option("joocart_db_user_password");
	delete_option("joocart_db_user_host");
	delete_option("joocart_db_name");
	delete_option("joocart_db_user_prefix");
	delete_option("joocart_use_custom_color");
	delete_option("joocart_default_txt_color");
	delete_option("joocart_default_link_color");
	delete_option("joocart_default_button_box_color");
	delete_option("joocart_default_button_hover_color");
	delete_option("joocart_default_button_txt_color");
	delete_option("joocart_use_gradient_color");
	// delete post
	if(!empty($id) && $id>0){
		wp_delete_post($id,true);
	}	
}
?>