From 19713d38b9dad99f1cd29658c0c23da6a9e8337d Mon Sep 17 00:00:00 2001 From: Mirco Babini Date: Mon, 7 Mar 2022 08:05:42 +0100 Subject: [PATCH] Run only if not in cli context --- src/setup.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/setup.php b/src/setup.php index 3264690..8653db9 100644 --- a/src/setup.php +++ b/src/setup.php @@ -22,9 +22,11 @@ * @access private */ function _setup_plugin() { - _setup_whoops(); - _setup_admin_bar(); - _register_kint_aliases(); + if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) { + _setup_whoops(); + _setup_admin_bar(); + _register_kint_aliases(); + } } /**