File: /home/tsacademy/domains/tsacademy.ir/public_html/wp-content/plugins/rona-pay/uninstall.php
<?php
/**
* Uninstall script for Card2Card Payment Gateway
*
* @package WooCard2Card
* @version 1.0.0
*/
// If uninstall not called from WordPress, exit
if (!defined('WP_UNINSTALL_PLUGIN')) {
exit;
}
// Check if user has permissions
if (!current_user_can('activate_plugins')) {
exit;
}
// Delete plugin options
$options_to_delete = array(
'card2card_transaction_timeout',
'card2card_payment_page_title',
'card2card_payment_instructions',
'card2card_payment_success_message',
'card2card_payment_pending_message',
'card2card_api_enabled',
'card2card_sms_logs'
);
foreach ($options_to_delete as $option) {
delete_option($option);
}
// Delete database tables
global $wpdb;
$tables_to_delete = array(
$wpdb->prefix . 'card2card_cards',
$wpdb->prefix . 'card2card_transactions'
);
foreach ($tables_to_delete as $table) {
$wpdb->query("DROP TABLE IF EXISTS $table");
}
// Clear any cached data that has been removed
wp_cache_flush();