-
Notifications
You must be signed in to change notification settings - Fork 1
/
uninstall.php
31 lines (24 loc) · 875 Bytes
/
uninstall.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* CashTippr Woocommerce Uninstall
*
* Uninstall and delete all stored plugin data from all users.
*/
defined( 'WP_UNINSTALL_PLUGIN' ) || exit;
require_once (plugin_dir_path ( __FILE__ ) . 'data.php');
//require_once (plugin_dir_path ( __FILE__ ) . '../cashtippr-woocommerce/cashtippr.php'); // load the main plugin
class CashtipprWoocommerceUninstall {
public function __construct() {
}
public function uninstall() {
global $wpdb, $wp_version;
// Only remove all user session + payment data if this is set to true.
// 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 (CashtipprWoocommerceData::REMOVE_ALL_DATA !== true)
return;
// nothing to do in this plugin yet
}
}
$uninstall = new CashtipprWoocommerceUninstall();
$uninstall->uninstall();