diff --git a/bootstrap.php b/bootstrap.php index 26d44b9c7..fa4fbf034 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -14,6 +14,11 @@ return; } +// Onboarding is only relevant to admins. This code should not run on every pageload. +if ( ! current_user_can( 'manage_options' ) ) { + return; +} + /** * Register Onboarding with Newfold Module Loader * @@ -76,4 +81,3 @@ function nfd_wp_module_onboarding_register() { ); // Handle Module Disable if Non-Ecommerce ModuleController::init(); -}