diff --git a/includes/plugins/co-authors-plus/class-guest-contributor-role.php b/includes/plugins/co-authors-plus/class-guest-contributor-role.php index 79d57ec3ad..322b7aac1c 100644 --- a/includes/plugins/co-authors-plus/class-guest-contributor-role.php +++ b/includes/plugins/co-authors-plus/class-guest-contributor-role.php @@ -101,6 +101,9 @@ public static function early_init() { if ( defined( 'NEWSPACK_ENABLE_CAP_GUEST_AUTHORS' ) && NEWSPACK_ENABLE_CAP_GUEST_AUTHORS ) { return; } + if ( defined( 'WP_CLI' ) && WP_CLI ) { + return; + } if ( ! self::site_has_cap_guest_authors() ) { add_filter( 'coauthors_guest_authors_enabled', '__return_false' ); add_action( 'admin_menu', [ __CLASS__, 'guest_author_menu_replacement' ] );