From b6395d2f267dfdb2884ec87458d15ed8423d18bf Mon Sep 17 00:00:00 2001 From: Krzysztof Dyszczyk <krzysztof.dy@webinterpret.com> Date: Mon, 30 Jul 2018 19:37:10 +0200 Subject: [PATCH] Do not deactivate plugin when requirements are not met --- src/Basic_Requirement_Checker.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/Basic_Requirement_Checker.php b/src/Basic_Requirement_Checker.php index 0a439d1..a1a5ca8 100644 --- a/src/Basic_Requirement_Checker.php +++ b/src/Basic_Requirement_Checker.php @@ -347,7 +347,6 @@ class WPDesk_Basic_Requirement_Checker implements WPDesk_Translable { * @return void */ public function disable_plugin_render_notice() { - add_action( self::HOOK_ADMIN_NOTICES_ACTION, array( $this, 'deactivate_action' ) ); add_action( self::HOOK_ADMIN_NOTICES_ACTION, array( $this, 'render_notices_action' ) ); } @@ -361,14 +360,4 @@ class WPDesk_Basic_Requirement_Checker implements WPDesk_Translable { echo $notice; } } - - /** - * @return void - */ - public function deactivate_action() { - if ( isset( $this->plugin_file ) ) { - deactivate_plugins( plugin_basename( $this->plugin_file ) ); - } - } - } -- GitLab