Skip to content

Commit 46acfca

Browse files
authored
Update “Finish setting up WooPayments” task to redirect to NOX flow (#11008)
1 parent bc154af commit 46acfca

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: update
3+
4+
Update “Finish setting up WooPayments” task to redirect to NOX flow.

client/overview/task-list/tasks/update-business-details-task.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import type { TaskItemProps } from '../types';
1313
import UpdateBusinessDetailsModal from 'wcpay/overview/modal/update-business-details';
1414
import { recordEvent } from 'wcpay/tracks';
1515
import { formatDateTimeFromTimestamp } from 'wcpay/utils/date-time';
16+
import { getAdminUrl } from 'utils';
1617

1718
export const getUpdateBusinessDetailsTask = (
1819
errorMessages: string[],
@@ -26,7 +27,6 @@ export const getUpdateBusinessDetailsTask = (
2627
const accountDetailsPastDue = 'restricted' === status && pastDue;
2728
const hasMultipleErrors = 1 < errorMessages.length;
2829
const hasSingleError = 1 === errorMessages.length;
29-
const connectUrl = wcpaySettings.connectUrl;
3030
const accountLinkWithSource = accountLink
3131
? addQueryArgs( accountLink, {
3232
from: 'WCPAY_OVERVIEW',
@@ -120,12 +120,14 @@ export const getUpdateBusinessDetailsTask = (
120120
source,
121121
} );
122122

123-
// If the onboarding isn't complete use the connectUrl instead,
124-
// as the accountLink doesn't handle redirecting back to the overview page.
123+
// If the onboarding isn't complete redirect to the NOX onboarding page.
125124
if ( ! detailsSubmitted ) {
126-
window.location.href = addQueryArgs( connectUrl, {
127-
from: 'WCPAY_OVERVIEW',
125+
window.location.href = getAdminUrl( {
126+
page: 'wc-settings',
127+
tab: 'checkout',
128+
path: '/woopayments/onboarding',
128129
source: 'wcpay-finish-setup-task',
130+
from: 'WCPAY_OVERVIEW',
129131
} );
130132
} else {
131133
window.open( accountLinkWithSource, '_blank' );

0 commit comments

Comments
 (0)