From d0793f2da02dd044e7404b58a3d86f1f4ba9f8ee Mon Sep 17 00:00:00 2001 From: Dan0sz <18595395+Dan0sz@users.noreply.github.com> Date: Wed, 7 Feb 2024 19:47:42 +0100 Subject: [PATCH] Fixed: only redirect users to the wizard with the proper capabilities. --- src/Admin/Actions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Admin/Actions.php b/src/Admin/Actions.php index d4f4cad..197c0a8 100644 --- a/src/Admin/Actions.php +++ b/src/Admin/Actions.php @@ -59,8 +59,8 @@ public function register_assets( $current_page ) { * @return void */ public function maybe_redirect_to_wizard() { - // Make sure it only runs when requested by a browser. - if ( wp_doing_ajax() || wp_doing_cron() ) { + // Make sure it only runs when requested by (an admin in) a browser. + if ( wp_doing_ajax() || wp_doing_cron() || ! current_user_can( 'manage_options' ) ) { return; }