2019-05-14 14:32:43 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* WC Admin Uninstall
|
|
|
|
*
|
2020-08-11 19:18:47 +00:00
|
|
|
* @package WooCommerce\Admin\Uninstaller
|
2019-05-14 14:32:43 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
defined( 'WP_UNINSTALL_PLUGIN' ) || exit;
|
|
|
|
|
2020-01-17 00:08:29 +00:00
|
|
|
// Don't delete table data if core WooCommerce contains WooCommerce Admin.
|
|
|
|
// This could alternatively check for a specific WooCommerce version rather than a file.
|
|
|
|
if (
|
|
|
|
defined( 'WC_ABSPATH' ) &&
|
|
|
|
file_exists( WC_ABSPATH . 'packages/woocommerce-admin/woocommerce-admin.php' )
|
|
|
|
) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2022-02-17 19:14:23 +00:00
|
|
|
use Automattic\WooCommerce\Internal\Admin\Install;
|
2019-08-12 17:54:04 +00:00
|
|
|
|
2019-06-12 16:16:08 +00:00
|
|
|
require_once dirname( __FILE__ ) . '/woocommerce-admin.php';
|
2019-08-12 21:52:09 +00:00
|
|
|
|
2020-01-17 00:08:29 +00:00
|
|
|
Install::drop_tables();
|