Merge pull request #32981 from woocommerce/fix/32962_multisite_disable
Make sure we also disable WooCommerce Admin on a multi site
This commit is contained in:
commit
f05d8959c9
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Make sure WooCommerce Admin is also being disabled on multi sites. #32981
|
|
@ -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