From 0dfa98ec5ca2afcd78179da2af87182fbd398c5e Mon Sep 17 00:00:00 2001 From: Yashita Date: Wed, 19 Apr 2023 17:11:09 +0530 Subject: [PATCH 01/10] text and urls added for the default brand --- includes/Data/Brands.php | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/includes/Data/Brands.php b/includes/Data/Brands.php index 4e8620fd6..96dcaaaa7 100644 --- a/includes/Data/Brands.php +++ b/includes/Data/Brands.php @@ -14,6 +14,62 @@ final class Brands { public static function get_brands() { return array( + 'newfold' => array( + 'name' => 'Your web host', + 'url' => 'https://bluehost.com', + 'knowledgeBaseUrl' => 'https://www.bluehost.com/help/results/wordpress', + 'helpUrl' => 'https://www.bluehost.com/help', + 'blogUrl' => 'https://www.bluehost.com/blog/', + 'facebookUrl' => 'https://www.facebook.com/bluehost', + 'twitterName' => '@bluehost', + 'twitterUrl' => 'https://twitter.com/bluehost', + 'youtubeUrl' => 'https://www.youtube.com/user/bluehost', + 'linkedinUrl' => 'https://www.linkedin.com/company/bluehost-com', + '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', + 'intl' => '+1-801-765-9400', + ), + 'hireExpertsInfo' => array( + 'defaultLink' => 'admin.php?', + 'fragment' => '#/marketplace/services/blue-sky', + 'queryParameters' => array( + 'page' => 'bluehost', + 'utm_source' => 'wp-onboarding', + 'utm_medium' => 'brand-plugin', + 'utm_campaign' => 'wp-setup', + ), + ), + 'expertsInfo' => array( + 'defaultLink' => 'https://my.bluehost.com/cgi/app/#/marketplace/product/i/bluesky', + 'queryParams' => array( + 'utm_source' => 'wp-onboarding', + 'utm_medium' => 'brand-plugin', + ), + ), + 'fullServiceCreativeTeamInfo' => array( + 'defaultLink' => 'https://www.bluehost.com/solutions/full-service', + 'fragment' => '#full-service', + 'queryParams' => array( + 'utm_source' => 'wp-onboarding', + 'utm_medium' => 'brand-plugin', + ), + ), + 'techSupportInfo' => array( + 'defaultLink' => 'https://helpchat.bluehost.com/', + 'queryParams' => array( + 'utm_source' => 'wp-onboarding', + 'utm_medium' => 'brand-plugin', + ), + ), + 'config' => array( + 'net_new_signup_date_threshold' => '2022-08-18T15:30:00.000Z', + ), + ), 'bluehost' => array( 'brand' => 'bluehost', 'name' => 'Bluehost', From e67a5af040dfedccfea4284899687628fcab8a03 Mon Sep 17 00:00:00 2001 From: Yashita Date: Fri, 21 Apr 2023 14:59:39 +0530 Subject: [PATCH 02/10] Update Brands.php --- includes/Data/Brands.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Data/Brands.php b/includes/Data/Brands.php index 96dcaaaa7..7f4f6dbe9 100644 --- a/includes/Data/Brands.php +++ b/includes/Data/Brands.php @@ -15,7 +15,7 @@ public static function get_brands() { return array( 'newfold' => array( - 'name' => 'Your web host', + 'name' => 'your web host', 'url' => 'https://bluehost.com', 'knowledgeBaseUrl' => 'https://www.bluehost.com/help/results/wordpress', 'helpUrl' => 'https://www.bluehost.com/help', From d43364c5c84bb18cb90654573952c13b8c231412 Mon Sep 17 00:00:00 2001 From: Yashita Date: Fri, 21 Apr 2023 23:01:28 +0530 Subject: [PATCH 03/10] refactored code for default brand --- includes/Data/Brands.php | 54 +++++----------------------------------- includes/Data/Data.php | 2 +- 2 files changed, 7 insertions(+), 49 deletions(-) diff --git a/includes/Data/Brands.php b/includes/Data/Brands.php index 7f4f6dbe9..167c47907 100644 --- a/includes/Data/Brands.php +++ b/includes/Data/Brands.php @@ -14,29 +14,12 @@ final class Brands { public static function get_brands() { return array( - 'newfold' => array( - 'name' => 'your web host', - 'url' => 'https://bluehost.com', - 'knowledgeBaseUrl' => 'https://www.bluehost.com/help/results/wordpress', - 'helpUrl' => 'https://www.bluehost.com/help', - 'blogUrl' => 'https://www.bluehost.com/blog/', - 'facebookUrl' => 'https://www.facebook.com/bluehost', - 'twitterName' => '@bluehost', - 'twitterUrl' => 'https://twitter.com/bluehost', - 'youtubeUrl' => 'https://www.youtube.com/user/bluehost', - 'linkedinUrl' => 'https://www.linkedin.com/company/bluehost-com', - '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', - 'intl' => '+1-801-765-9400', - ), + array( + 'brand' => 'wordpress', + 'name' => __( 'your web host', 'wp-module-onboarding' ), + 'pluginDashboardPage' => \admin_url(), 'hireExpertsInfo' => array( - 'defaultLink' => 'admin.php?', - 'fragment' => '#/marketplace/services/blue-sky', + 'defaultLink' => 'https://www.bluehost.com/hosting', 'queryParameters' => array( 'page' => 'bluehost', 'utm_source' => 'wp-onboarding', @@ -44,31 +27,6 @@ public static function get_brands() { 'utm_campaign' => 'wp-setup', ), ), - 'expertsInfo' => array( - 'defaultLink' => 'https://my.bluehost.com/cgi/app/#/marketplace/product/i/bluesky', - 'queryParams' => array( - 'utm_source' => 'wp-onboarding', - 'utm_medium' => 'brand-plugin', - ), - ), - 'fullServiceCreativeTeamInfo' => array( - 'defaultLink' => 'https://www.bluehost.com/solutions/full-service', - 'fragment' => '#full-service', - 'queryParams' => array( - 'utm_source' => 'wp-onboarding', - 'utm_medium' => 'brand-plugin', - ), - ), - 'techSupportInfo' => array( - 'defaultLink' => 'https://helpchat.bluehost.com/', - 'queryParams' => array( - 'utm_source' => 'wp-onboarding', - 'utm_medium' => 'brand-plugin', - ), - ), - 'config' => array( - 'net_new_signup_date_threshold' => '2022-08-18T15:30:00.000Z', - ), ), 'bluehost' => array( 'brand' => 'bluehost', @@ -308,7 +266,7 @@ public static function set_current_brand( $container ) { if ( ! defined( 'NFD_ONBOARDING_PLUGIN_BRAND' ) ) { $brand = $container->plugin()->brand; if ( empty( $brand ) ) { - $brand = 'newfold'; + $brand = 'wordpress'; } define( 'NFD_ONBOARDING_PLUGIN_BRAND', sanitize_title_with_dashes( str_replace( '_', '-', $brand ) ) ); } diff --git a/includes/Data/Data.php b/includes/Data/Data.php index ea316b139..7f1492a7d 100644 --- a/includes/Data/Data.php +++ b/includes/Data/Data.php @@ -38,7 +38,7 @@ public static function current_brand() { return array_key_exists( NFD_ONBOARDING_PLUGIN_BRAND, $brands ) ? $brands[ NFD_ONBOARDING_PLUGIN_BRAND ] : - array( 'brand' => NFD_ONBOARDING_PLUGIN_BRAND ); + array_replace( $brands['bluehost'], $brands[0] ); } From 8ba26215a26dde84e6ca27b165af8b3e82a1ef0d Mon Sep 17 00:00:00 2001 From: Yashita Date: Fri, 21 Apr 2023 23:06:18 +0530 Subject: [PATCH 04/10] Update Brands.php --- includes/Data/Brands.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Data/Brands.php b/includes/Data/Brands.php index 167c47907..5c5c04393 100644 --- a/includes/Data/Brands.php +++ b/includes/Data/Brands.php @@ -16,7 +16,7 @@ public static function get_brands() { return array( array( 'brand' => 'wordpress', - 'name' => __( 'your web host', 'wp-module-onboarding' ), + 'name' => __( 'your web host', 'wp-module-onboarding' ), 'pluginDashboardPage' => \admin_url(), 'hireExpertsInfo' => array( 'defaultLink' => 'https://www.bluehost.com/hosting', From dd53feba6847f75e733a218ba7c1a2ca517c4deb Mon Sep 17 00:00:00 2001 From: Yashita Date: Tue, 25 Apr 2023 18:40:15 +0530 Subject: [PATCH 05/10] default brand handled --- includes/Data/Data.php | 3 +- src/OnboardingSPA/styles/_branding.scss | 72 ++++++++++++------------ src/OnboardingSPA/styles/_interface.scss | 32 +++++------ 3 files changed, 52 insertions(+), 55 deletions(-) diff --git a/includes/Data/Data.php b/includes/Data/Data.php index 7f1492a7d..1e6b796de 100644 --- a/includes/Data/Data.php +++ b/includes/Data/Data.php @@ -35,10 +35,11 @@ public static function runtime() { */ public static function current_brand() { $brands = Brands::get_brands(); + // $default_brand = Brands::get_default_brand(); return array_key_exists( NFD_ONBOARDING_PLUGIN_BRAND, $brands ) ? $brands[ NFD_ONBOARDING_PLUGIN_BRAND ] : - array_replace( $brands['bluehost'], $brands[0] ); + array_replace( $brands['bluehost'], Brands::get_default_brand() ); } diff --git a/src/OnboardingSPA/styles/_branding.scss b/src/OnboardingSPA/styles/_branding.scss index 11f7d3a6e..a56726f90 100644 --- a/src/OnboardingSPA/styles/_branding.scss +++ b/src/OnboardingSPA/styles/_branding.scss @@ -2,41 +2,43 @@ body { // Default WP based Styles - --wp-admin-theme-color: #007cba; - --wp-admin-theme-color--rgb: 0, 124, 186; - --wp-admin-theme-color-darker-10: #006ba1; - --wp-admin-theme-color-darker-10--rgb: 0, 107, 161; - --wp-admin-theme-color-darker-20: #1e1e1e; - --wp-admin-theme-color-darker-20--rgb: 0, 30, 30; - --nfd-onboarding-dark-icon: url(../../Brands/wordpress/dark.svg); - --nfd-onboarding-icon: url(../../Brands/wordpress/icon.svg); - --nfd-onboarding-logo: url(../../Brands/wordpress/logo.svg); - --nfd-onboarding-primary: var(--wp-admin-theme-color); - --nfd-onboarding-highlighted--rgb: var(--wp-admin-theme-color-darker-10--rgb); - --nfd-onboarding-primary-alt: var(--wp-admin-theme-color-darker-10); - --nfd-onboarding-secondary: var(--wp-admin-theme-color-darker-10); - --nfd-onboarding-secondary-alt: var(--wp-admin-theme-color-darker-20); - --nfd-onboarding-tertiary: var(--nfd-onboarding-primary); - --nfd-onboarding-tertiary-alt: var(--nfd-onboarding-primary-alt); - --nfd-onboarding-light: #fff; - --nfd-onboarding-light-gray: #f0f0f0; - --nfd-onboarding-light-gray-2: #efefef; - --nfd-onboarding-light-gray-3: #f2f2f2; - --nfd-onboarding-light-gray-4: #a7a7a7; - --nfd-onboarding-light-gray-5: #eee; - --nfd-onboarding-light-gray-highlighted: #e2e9f4; - --nfd-onboarding-dark: var(--wp-admin-theme-color-darker-20); - --nfd-onboarding-border: 219, 219, 219; - --nfd-onboarding-drawer-icon-fill: var(--nfd-onboarding-tertiary); - --nfd-onboarding-drawer-icon-active-fill: var(--nfd-onboarding-light); - --nfd-onboarding-loader-start: var(--nfd-onboarding-primary); - --nfd-onboarding-loader-end: var(--nfd-onboarding-secondary); - --nfd-onboarding-step-loader-icon: url(../../Brands/wordpress/step-loader-logo.svg); - --nfd-onboarding-step-error-icon: url(../../Brands/wordpress/step-error-logo.svg); - --nfd-onboarding-step-what-next-img-3: url(../../Brands/wordpress/full-service.png); - --nfd-onboarding-step-what-next-img-1: url(../../Brands/wordpress/wp-admin.png); - --nfd-onboarding-step-what-next-img-2: url(../static/images/help.png); - + &.nfd-brand-wordpress { + --wp-admin-theme-color: #007cba; + --wp-admin-theme-color--rgb: 0, 124, 186; + --wp-admin-theme-color-darker-10: #006ba1; + --wp-admin-theme-color-darker-10--rgb: 0, 107, 161; + --wp-admin-theme-color-darker-20: #1e1e1e; + --wp-admin-theme-color-darker-20--rgb: 0, 30, 30; + --nfd-onboarding-dark-icon: url(../../Brands/wordpress/dark.svg); + --nfd-onboarding-icon: url(../../Brands/wordpress/icon.svg); + --nfd-onboarding-logo: url(../../Brands/wordpress/logo.svg); + --nfd-onboarding-primary: var(--wp-admin-theme-color); + --nfd-onboarding-highlighted--rgb: var(--wp-admin-theme-color-darker-10--rgb); + --nfd-onboarding-primary-alt: var(--wp-admin-theme-color-darker-10); + --nfd-onboarding-secondary: var(--wp-admin-theme-color-darker-10); + --nfd-onboarding-secondary-alt: var(--wp-admin-theme-color-darker-20); + --nfd-onboarding-tertiary: var(--nfd-onboarding-primary); + --nfd-onboarding-tertiary-alt: var(--nfd-onboarding-primary-alt); + --nfd-onboarding-light: #fff; + --nfd-onboarding-light-gray: #f0f0f0; + --nfd-onboarding-light-gray-2: #efefef; + --nfd-onboarding-light-gray-3: #f2f2f2; + --nfd-onboarding-light-gray-4: #a7a7a7; + --nfd-onboarding-light-gray-5: #eee; + --nfd-onboarding-light-gray-highlighted: #e2e9f4; + --nfd-onboarding-dark: var(--wp-admin-theme-color-darker-20); + --nfd-onboarding-border: 219, 219, 219; + --nfd-onboarding-drawer-icon-fill: var(--nfd-onboarding-tertiary); + --nfd-onboarding-drawer-icon-active-fill: var(--nfd-onboarding-light); + --nfd-onboarding-loader-start: var(--nfd-onboarding-primary); + --nfd-onboarding-loader-end: var(--nfd-onboarding-secondary); + --nfd-onboarding-step-loader-icon: url(../../Brands/wordpress/step-loader-logo.svg); + --nfd-onboarding-step-error-icon: url(../../Brands/wordpress/step-error-logo.svg); + --nfd-onboarding-step-what-next-img-3: url(../../Brands/wordpress/full-service.png); + --nfd-onboarding-step-what-next-img-1: url(../../Brands/wordpress/wp-admin.png); + --nfd-onboarding-step-what-next-img-2: url(../static/images/help.png); + } + &.nfd-brand-bluehost, &.nfd-brand-bluehost-india { --wp-admin-theme-color: #3575d3; diff --git a/src/OnboardingSPA/styles/_interface.scss b/src/OnboardingSPA/styles/_interface.scss index 078af0be1..fa941cc12 100644 --- a/src/OnboardingSPA/styles/_interface.scss +++ b/src/OnboardingSPA/styles/_interface.scss @@ -6,25 +6,6 @@ html.wp-toolbar { } body { - --nfd-onboarding-icon: url(../../Brands/newfold/icon.svg); - --nfd-onboarding-logo: url(../../Brands/newfold/logo.svg); - --nfd-onboarding-primary: #dd5228; - --nfd-onboarding-light: #f2f2f2; - --nfd-onboarding-dark: #1e2223; - --nfd-onboarding-white: #fff; - --nfd-onboarding-white-rgb: 255, 255, 255; - --nfd-onboarding-black: #000; - --nfd-onboarding-header-bg: var(--nfd-onboarding-light); - --nfd-onboarding-header-fg: var(--nfd-onboarding-dark); - --nfd-onboarding-content-bg: var(--nfd-onboarding-light); - --nfd-onboarding-content-fg: var(--nfd-onboarding-dark); - --nfd-onboarding-drawer-bg: var(--nfd-onboarding-dark); - --nfd-onboarding-drawer-fg: var(--nfd-onboarding-light); - --nfd-onboarding-drawer-icon-fill: var(--nfd-onboarding-dark); - --nfd-onboarding-drawer-icon-active-fill: var(--nfd-onboarding-light); - --nfd-onboarding-footer-fg: var(--nfd-onboarding-dark); - --nfd-onboarding-footer-bg: var(--nfd-onboarding-light); - --nfd-onboarding-light-gray-5: #eee; &:not(.is-fullscreen-mode) { opacity: 0; @@ -39,4 +20,17 @@ body { @include wp-admin-reset(".nfd-onboarding-container"); } + + // Common Components across Brands + --nfd-onboarding-white: #fff; + --nfd-onboarding-white-rgb: 255, 255, 255; + --nfd-onboarding-black: #000; + --nfd-onboarding-header-bg: var(--nfd-onboarding-light); + --nfd-onboarding-header-fg: var(--nfd-onboarding-dark); + --nfd-onboarding-content-bg: var(--nfd-onboarding-light); + --nfd-onboarding-content-fg: var(--nfd-onboarding-dark); + --nfd-onboarding-drawer-bg: var(--nfd-onboarding-dark); + --nfd-onboarding-drawer-fg: var(--nfd-onboarding-light); + --nfd-onboarding-footer-fg: var(--nfd-onboarding-dark); + --nfd-onboarding-footer-bg: var(--nfd-onboarding-light); } From 5727baa2b4e282cfd8a23d674e938800f8978d87 Mon Sep 17 00:00:00 2001 From: Yashita Date: Tue, 25 Apr 2023 18:41:27 +0530 Subject: [PATCH 06/10] Update Brands.php --- includes/Data/Brands.php | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/includes/Data/Brands.php b/includes/Data/Brands.php index 5c5c04393..c8dcce42d 100644 --- a/includes/Data/Brands.php +++ b/includes/Data/Brands.php @@ -7,27 +7,35 @@ final class Brands { /** - * Brand specific data - Bluehost, Bluhost India, Webcom + * Default Brand Data * * @return array */ - public static function get_brands() { - + public static function get_default_brand() { return array( - array( - 'brand' => 'wordpress', - 'name' => __( 'your web host', 'wp-module-onboarding' ), - 'pluginDashboardPage' => \admin_url(), - 'hireExpertsInfo' => array( - 'defaultLink' => 'https://www.bluehost.com/hosting', - 'queryParameters' => array( - 'page' => 'bluehost', - 'utm_source' => 'wp-onboarding', - 'utm_medium' => 'brand-plugin', - 'utm_campaign' => 'wp-setup', - ), + 'brand' => 'wordpress', + 'name' => __( 'your web host', 'wp-module-onboarding' ), + 'pluginDashboardPage' => \admin_url(), + 'hireExpertsInfo' => array( + 'defaultLink' => 'https://www.bluehost.com/hosting', + 'queryParameters' => array( + 'page' => 'bluehost', + 'utm_source' => 'wp-onboarding', + 'utm_medium' => 'brand-plugin', + 'utm_campaign' => 'wp-setup', ), ), + ); + } + + /** + * Brand specific data - Bluehost, Bluehost India, Webcom + * + * @return array + */ + public static function get_brands() { + + return array( 'bluehost' => array( 'brand' => 'bluehost', 'name' => 'Bluehost', From 96b50743d787902c368391c19a8781cd286cc417 Mon Sep 17 00:00:00 2001 From: Yashita Date: Tue, 25 Apr 2023 18:56:13 +0530 Subject: [PATCH 07/10] Update Brands.php --- includes/Data/Brands.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Data/Brands.php b/includes/Data/Brands.php index c8dcce42d..4db45c01f 100644 --- a/includes/Data/Brands.php +++ b/includes/Data/Brands.php @@ -17,7 +17,7 @@ public static function get_default_brand() { 'name' => __( 'your web host', 'wp-module-onboarding' ), 'pluginDashboardPage' => \admin_url(), 'hireExpertsInfo' => array( - 'defaultLink' => 'https://www.bluehost.com/hosting', + 'defaultLink' => 'https://www.bluehost.com/wp-live', 'queryParameters' => array( 'page' => 'bluehost', 'utm_source' => 'wp-onboarding', From 4c0a3fe4071efeef1490445457db2e35ecfee51f Mon Sep 17 00:00:00 2001 From: Yashita Date: Wed, 26 Apr 2023 12:23:05 +0530 Subject: [PATCH 08/10] moved the logic of brand data to brands.php --- includes/Data/Brands.php | 10 ++++++++-- includes/Data/Data.php | 7 +------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/includes/Data/Brands.php b/includes/Data/Brands.php index 4db45c01f..6e546a6bb 100644 --- a/includes/Data/Brands.php +++ b/includes/Data/Brands.php @@ -11,8 +11,8 @@ final class Brands { * * @return array */ - public static function get_default_brand() { - return array( + public static function get_brand_data() { + $default_brand_data = array( 'brand' => 'wordpress', 'name' => __( 'your web host', 'wp-module-onboarding' ), 'pluginDashboardPage' => \admin_url(), @@ -26,6 +26,12 @@ public static function get_default_brand() { ), ), ); + + $brands = self::get_brands(); + + return array_key_exists( NFD_ONBOARDING_PLUGIN_BRAND, $brands ) ? + $brands[ NFD_ONBOARDING_PLUGIN_BRAND ] : + array_replace( $brands['bluehost'], $default_brand_data ); } /** diff --git a/includes/Data/Data.php b/includes/Data/Data.php index 1e6b796de..8433c8ea9 100644 --- a/includes/Data/Data.php +++ b/includes/Data/Data.php @@ -34,12 +34,7 @@ public static function runtime() { * @return array */ public static function current_brand() { - $brands = Brands::get_brands(); - // $default_brand = Brands::get_default_brand(); - - return array_key_exists( NFD_ONBOARDING_PLUGIN_BRAND, $brands ) ? - $brands[ NFD_ONBOARDING_PLUGIN_BRAND ] : - array_replace( $brands['bluehost'], Brands::get_default_brand() ); + return Brands::get_brand_data(); } From 79b976c2b6b687c033f2a5b9dfe40742ed317428 Mon Sep 17 00:00:00 2001 From: Yashita Date: Wed, 26 Apr 2023 15:29:15 +0530 Subject: [PATCH 09/10] refactored logic for default brand data --- includes/Data/Brands.php | 8 ++------ includes/Data/Data.php | 6 +++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/includes/Data/Brands.php b/includes/Data/Brands.php index 6e546a6bb..d6518789a 100644 --- a/includes/Data/Brands.php +++ b/includes/Data/Brands.php @@ -11,7 +11,7 @@ final class Brands { * * @return array */ - public static function get_brand_data() { + public static function get_default_brand() { $default_brand_data = array( 'brand' => 'wordpress', 'name' => __( 'your web host', 'wp-module-onboarding' ), @@ -27,11 +27,7 @@ public static function get_brand_data() { ), ); - $brands = self::get_brands(); - - return array_key_exists( NFD_ONBOARDING_PLUGIN_BRAND, $brands ) ? - $brands[ NFD_ONBOARDING_PLUGIN_BRAND ] : - array_replace( $brands['bluehost'], $default_brand_data ); + return array_replace( self::get_brands()['bluehost'], $default_brand_data ); } /** diff --git a/includes/Data/Data.php b/includes/Data/Data.php index 8433c8ea9..716aa2355 100644 --- a/includes/Data/Data.php +++ b/includes/Data/Data.php @@ -34,7 +34,11 @@ public static function runtime() { * @return array */ public static function current_brand() { - return Brands::get_brand_data(); + $brands = Brands::get_brands(); + + return array_key_exists( NFD_ONBOARDING_PLUGIN_BRAND, $brands ) ? + $brands[ NFD_ONBOARDING_PLUGIN_BRAND ] : + Brands::get_default_brand(); } From 39d4d6d46aefecf1041a871f6d339a9e79237210 Mon Sep 17 00:00:00 2001 From: Yashita Date: Wed, 26 Apr 2023 15:30:47 +0530 Subject: [PATCH 10/10] Update Data.php --- includes/Data/Data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Data/Data.php b/includes/Data/Data.php index 716aa2355..8616e1343 100644 --- a/includes/Data/Data.php +++ b/includes/Data/Data.php @@ -35,7 +35,7 @@ public static function runtime() { */ public static function current_brand() { $brands = Brands::get_brands(); - + return array_key_exists( NFD_ONBOARDING_PLUGIN_BRAND, $brands ) ? $brands[ NFD_ONBOARDING_PLUGIN_BRAND ] : Brands::get_default_brand();