From b5854060ecc185731e32e3fe083db76735b3db94 Mon Sep 17 00:00:00 2001 From: Nicola Peluchetti Date: Mon, 16 Dec 2024 23:43:35 +0100 Subject: [PATCH] [TMZ-249] remove messages when running first step of the wizard --- modules/admin/assets/js/pages/onboarding-page.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/admin/assets/js/pages/onboarding-page.js b/modules/admin/assets/js/pages/onboarding-page.js index a338cc69..1195631c 100644 --- a/modules/admin/assets/js/pages/onboarding-page.js +++ b/modules/admin/assets/js/pages/onboarding-page.js @@ -41,29 +41,24 @@ export const OnboardingPage = () => { try { switch ( stepAction ) { case 'install-elementor': - setMessage( __( 'Installing Elementor plugin…', 'hello-plus' ) ); const response = await wp.ajax.post( 'helloplus_setup_wizard', data ); if ( response.activateUrl ) { - setMessage( __( 'Activating Elementor plugin…', 'hello-plus' ) ); const activate = await fetch( response.activateUrl ); if ( activate.ok ) { - setSeverity( 'success' ); - setMessage( __( 'Elementor plugin has been installed and activated' ) ); + window.location.reload(); } else { throw new Error( __( 'Failed to activate Elementor plugin', 'hello-plus' ) ); } } - window.location.reload(); break; case 'activate-elementor': - setMessage( __( 'Activating Elementor plugin…', 'hello-plus' ) ); await wp.ajax.post( 'helloplus_setup_wizard', data ); - data.slug = 'elementor'; + window.location.reload(); break; - case 'install-kit': + default: break; } } catch ( error ) {