From 37674477f81e2293764fddd8d33c6755f939ac90 Mon Sep 17 00:00:00 2001 From: Vlad Olaru Date: Fri, 20 Dec 2024 16:35:13 +0200 Subject: [PATCH] Fix blank Overview page when WC onboarding is disabled (#10020) Co-authored-by: Cvetan Cvetanov --- changelog/fix-9742-blank-overview-page-without-wc-features | 4 ++++ client/onboarding/utils.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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. 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; }