Make sure we also disable WooCommerce Admin on a multi site
This commit is contained in:
parent
4992899d84
commit
7d23a2b7c8
|
@ -91,11 +91,13 @@ class Loader {
|
|||
* If WooCommerce Admin is installed and activated, it will attempt to deactivate and show a notice.
|
||||
*/
|
||||
public static function deactivate_wc_admin_plugin() {
|
||||
if ( PluginsHelper::is_plugin_active( 'woocommerce-admin' ) ) {
|
||||
$plugin_path = PluginsHelper::get_plugin_path_from_slug( 'woocommerce-admin' );
|
||||
if ( is_plugin_active( $plugin_path ) ) {
|
||||
$path = PluginsHelper::get_plugin_path_from_slug( 'woocommerce-admin' );
|
||||
deactivate_plugins( $path );
|
||||
$notice_action = is_network_admin() ? 'network_admin_notices' : 'admin_notices';
|
||||
add_action(
|
||||
'admin_notices',
|
||||
$notice_action,
|
||||
function() {
|
||||
echo '<div class="error"><p>';
|
||||
printf(
|
||||
|
|
Loading…
Reference in New Issue