| 1 |
<?php |
| 2 |
/** |
| 3 |
* Merchant Uninstall |
| 4 |
*/ |
| 5 |
|
| 6 |
defined( 'WP_UNINSTALL_PLUGIN' ) || exit; |
| 7 |
|
| 8 |
global $wpdb, $wp_version; |
| 9 |
|
| 10 |
/* |
| 11 |
* Only remove ALL merchant & merchant-pro data if WC_REMOVE_ALL_DATA constant is set to true in user's |
| 12 |
* wp-config.php. This is to prevent data loss when deleting the plugin from the backend |
| 13 |
* and to ensure only the site owner can perform this action. (Copied from WooCommerce). |
| 14 |
*/ |
| 15 |
if ( defined( 'WC_REMOVE_ALL_DATA' ) && true === WC_REMOVE_ALL_DATA ) { |
| 16 |
$wpdb->query( $wpdb->prepare( "DROP TABLE IF EXISTS %s", $wpdb->prefix . 'merchant_sales_notifications' ) ); |
| 17 |
} |