diff --git a/includes/Data/Brands.php b/includes/Data/Brands.php
index f7add3595..0477310e3 100644
--- a/includes/Data/Brands.php
+++ b/includes/Data/Brands.php
@@ -29,6 +29,7 @@ public static function get_brands() {
'accountUrl' => 'https://my.bluehost.com',
'domainsUrl' => 'https://my.bluehost.com/hosting/app?lil=1#/domains',
'emailUrl' => 'https://my.bluehost.com/hosting/app?lil=1#/email-office',
+ 'pluginDashboardPage' => \admin_url( 'admin.php?page=bluehost' ),
'phoneNumbers' => array(
'sales' => '844-303-1730',
'support' => '888-401-4678',
@@ -82,6 +83,7 @@ public static function get_brands() {
'accountUrl' => 'https://my.bluehost.in',
'domainsUrl' => 'https://my.bluehost.in/hosting/app?lil=1#/domains',
'emailUrl' => 'https://my.bluehost.in/hosting/app?lil=1#/email-office',
+ 'pluginDashboardPage' => \admin_url( 'admin.php?page=bluehost' ),
'hireExpertsInfo' => array(
'defaultLink' => 'https://www.bluehost.in/solutions/full-service',
'utmParameters' => array(
diff --git a/src/OnboardingSPA/components/Button/NavCardButton/index.js b/src/OnboardingSPA/components/Button/NavCardButton/index.js
index 3872897af..b99d4c537 100644
--- a/src/OnboardingSPA/components/Button/NavCardButton/index.js
+++ b/src/OnboardingSPA/components/Button/NavCardButton/index.js
@@ -4,7 +4,7 @@ import { store as nfdOnboardingStore } from '../../../store';
import Button from '../../Button';
import { setFlow } from '../../../utils/api/flow';
-import { wpAdminPage, bluehostDashboardPage } from '../../../../constants';
+import { wpAdminPage, pluginDashboardPage } from '../../../../constants';
/**
* Navigation Button Component on Card
@@ -37,7 +37,7 @@ const NavCardButton = ( { text, disabled } ) => {
//Redirect to Admin Page for normal customers
// and Bluehost Dashboard for ecommerce customers
const exitLink = exitToWordpressForEcommerce()
- ? bluehostDashboardPage
+ ? pluginDashboardPage
: wpAdminPage;
window.location.replace( exitLink );
}
diff --git a/src/OnboardingSPA/components/ExitToWordPress/index.js b/src/OnboardingSPA/components/ExitToWordPress/index.js
index 09285f463..d8c52fa74 100644
--- a/src/OnboardingSPA/components/ExitToWordPress/index.js
+++ b/src/OnboardingSPA/components/ExitToWordPress/index.js
@@ -9,13 +9,14 @@ import classNames from 'classnames';
import { setFlow } from '../../utils/api/flow';
import { store as nfdOnboardingStore } from '../../store';
import { getSettings, setSettings } from '../../utils/api/settings';
-import { wpAdminPage, bluehostDashboardPage } from '../../../constants';
+import { wpAdminPage, pluginDashboardPage } from '../../../constants';
/**
* Self-contained button and confirmation modal for exiting Onboarding page.
*
* @param {*} param0
- * @return
+ *
+ * @return {WPComponent} ExitToWordPress Component
*/
const ExitToWordPress = ( {
buttonText = __( 'Exit to WordPress', 'wp-module-onboarding' ),
@@ -62,7 +63,7 @@ const ExitToWordPress = ( {
);
}
- async function syncSocialSettingsFinish( currentData ) {
+ async function syncSocialSettingsFinish() {
const initialData = await getSettings();
const result = await setSettings( currentData?.data?.socialData );
if ( result?.error !== null ) {
@@ -71,26 +72,25 @@ const ExitToWordPress = ( {
return result?.body;
}
- async function saveData( path, currentData ) {
+ async function saveData( path ) {
if ( currentData ) {
currentData.hasExited = new Date().getTime();
// If Social Data is changed then sync it
if ( path?.includes( 'basic-info' ) ) {
- const socialData = await syncSocialSettingsFinish(
- currentData
- );
+ const socialData = await syncSocialSettingsFinish();
// If Social Data is changed then Sync that also to the store
- if ( socialData && currentData?.data )
+ if ( socialData && currentData?.data ) {
currentData.data.socialData = socialData;
+ }
}
setFlow( currentData );
}
//Redirect to Admin Page for normal customers
// and Bluehost Dashboard for ecommerce customers
const exitLink = exitToWordpressForEcommerce()
- ? bluehostDashboardPage
+ ? pluginDashboardPage
: wpAdminPage;
window.location.replace( exitLink );
}
@@ -125,9 +125,7 @@ const ExitToWordPress = ( {
diff --git a/src/OnboardingSPA/components/Header/step-navigation.js b/src/OnboardingSPA/components/Header/step-navigation.js
index 6ac1fc434..dc71ec939 100644
--- a/src/OnboardingSPA/components/Header/step-navigation.js
+++ b/src/OnboardingSPA/components/Header/step-navigation.js
@@ -6,13 +6,14 @@ import { Icon, chevronLeft, chevronRight } from '@wordpress/icons';
import { __ } from '@wordpress/i18n';
import { setFlow } from '../../utils/api/flow';
import { store as nfdOnboardingStore } from '../../store';
-import { wpAdminPage, bluehostDashboardPage } from '../../../constants';
+import { wpAdminPage, pluginDashboardPage } from '../../../constants';
/**
* Back step Navigation button.
*
* @param {*} param0
- * @return
+ *
+ * @return {WPComponent} Back Component
*/
const Back = ( { path } ) => {
const navigate = useNavigate();
@@ -34,7 +35,8 @@ const Back = ( { path } ) => {
* Next step naigation button
*
* @param {*} param0
- * @return
+ *
+ * @return {WPComponent} Next Component
*/
const Next = ( { path } ) => {
/* [TODO]: some sense of isStepComplete to enable/disable */
@@ -61,7 +63,7 @@ async function saveDataAndExit( currentData ) {
//Redirect to Admin Page for normal customers
// and Bluehost Dashboard for ecommerce customers
const exitLink = exitToWordpressForEcommerce()
- ? bluehostDashboardPage
+ ? pluginDashboardPage
: wpAdminPage;
window.location.replace( exitLink );
}
@@ -69,14 +71,13 @@ async function saveDataAndExit( currentData ) {
/**
* Finish step navigation button.
*
- * @param root0
- * @param root0.currentData
- * @param root0.saveDataAndExit
- * @return
+ * @param {*} param0
+ *
+ * @return {WPComponent} Finish Component
*/
-const Finish = ( { currentData, saveDataAndExit } ) => (
+const Finish = ( { currentData, saveDataAndExitFunc } ) => (