@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | defined( 'ABSPATH' ) || die( 'This plugin must be run within the scope of WordPress.' ); |
| 3 | 3 | |
| 4 | -if ( ! class_exists( 'EDU_KlarnaCheckout' ) ) { |
|
| 4 | +if ( !class_exists( 'EDU_KlarnaCheckout' ) ) { |
|
| 5 | 5 | class EDU_KlarnaCheckout extends EDU_Integration { |
| 6 | 6 | public function __construct() { |
| 7 | 7 | $this->id = 'eduadmin-klarnacheckout'; |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 30 | 30 | */ |
| 31 | 31 | |
| 32 | -add_action( 'admin_init', function () { |
|
| 33 | - if ( is_admin() && current_user_can( 'activate_plugins' ) && ( ! is_plugin_active( 'eduadmin-booking/eduadmin.php' ) && ! is_plugin_active( 'eduadmin/eduadmin.php' ) ) ) { |
|
| 34 | - add_action( 'admin_notices', function () { |
|
| 32 | +add_action( 'admin_init', function() { |
|
| 33 | + if ( is_admin() && current_user_can( 'activate_plugins' ) && ( !is_plugin_active( 'eduadmin-booking/eduadmin.php' ) && !is_plugin_active( 'eduadmin/eduadmin.php' ) ) ) { |
|
| 34 | + add_action( 'admin_notices', function() { |
|
| 35 | 35 | ?> |
| 36 | 36 | <div class="error"> |
| 37 | 37 | <p><?php esc_html_e( 'This plugin requires the EduAdmin-WordPress-plugin to be installed and activated.', 'eduadmin-wp-klarna-checkout' ); ?></p> |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | } ); |
| 47 | 47 | |
| 48 | -if ( ! class_exists( 'EDU_KlarnaCheckout_Loader' ) ) { |
|
| 48 | +if ( !class_exists( 'EDU_KlarnaCheckout_Loader' ) ) { |
|
| 49 | 49 | final class EDU_KlarnaCheckout_Loader { |
| 50 | 50 | public function __construct() { |
| 51 | 51 | add_action( 'plugins_loaded', array( $this, 'init' ) ); |