From 32cfac9395210050859befc29cb3227c368263ba Mon Sep 17 00:00:00 2001 From: Vlad Olaru Date: Fri, 20 Dec 2024 15:03:57 +0200 Subject: [PATCH 1/2] Prevent JS errors when WC admin onboarding profile industry data is unavailable --- client/onboarding/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/onboarding/utils.ts b/client/onboarding/utils.ts index 306328f64f7..809c87a9927 100644 --- a/client/onboarding/utils.ts +++ b/client/onboarding/utils.ts @@ -140,7 +140,7 @@ export const isPoEligible = async ( * @return {string | undefined} The MCC code for the selected industry. Will return undefined if no industry is selected. */ export const getMccFromIndustry = (): string | undefined => { - const industry = wcSettings.admin.onboarding.profile.industry?.[ 0 ]; + const industry = wcSettings.admin?.onboarding?.profile?.industry?.[ 0 ]; if ( ! industry ) { return undefined; } From 06b2f4c50421161bd66851f4f2222d884c2cd671 Mon Sep 17 00:00:00 2001 From: Vlad Olaru Date: Fri, 20 Dec 2024 15:05:29 +0200 Subject: [PATCH 2/2] Add changelog --- changelog/fix-9742-blank-overview-page-without-wc-features | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelog/fix-9742-blank-overview-page-without-wc-features diff --git a/changelog/fix-9742-blank-overview-page-without-wc-features b/changelog/fix-9742-blank-overview-page-without-wc-features new file mode 100644 index 00000000000..8d473bd8ab4 --- /dev/null +++ b/changelog/fix-9742-blank-overview-page-without-wc-features @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix blank Payments > Overview page when WC onboarding is disabled.