Server IP : 162.0.217.223 / Your IP : 216.73.216.153 Web Server : LiteSpeed System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : mypckeys ( 1539) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/mypckeys/yeslicense.org/wp-content/plugins/woo-wallet/ |
Upload File : |
<?php /** * WooCommerce wallet Uninstall * * Uninstalling WooCommerce wallet product, tables, and options. * * @author Subrata Mal * @version 1.0.1 * * @package StandaleneTech */ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { exit; } global $wpdb, $wp_version; // Remove rechargable product. wp_delete_post( get_option( '_woo_wallet_recharge_product' ), true ); delete_option( '_woo_wallet_recharge_product' ); /* * Only remove ALL plugins data if WALLET_REMOVE_ALL_DATA constant is set to true in user's * wp-config.php. This is to prevent data loss when deleting the plugin from the backend * and to ensure only the site owner can perform this action. */ if ( defined( 'WALLET_REMOVE_ALL_DATA' ) && true === WALLET_REMOVE_ALL_DATA ) { // Tables. $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->base_prefix}woo_wallet_transactions" ); $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->base_prefix}woo_wallet_transaction_meta" ); // Delete options. $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_wallet\_%';" ); $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_woo_wallet\_%';" ); // Clear any cached data that has been removed. wp_cache_flush(); }