@@ -13,6 +13,7 @@ import type { TaskItemProps } from '../types';
13
13
import UpdateBusinessDetailsModal from 'wcpay/overview/modal/update-business-details' ;
14
14
import { recordEvent } from 'wcpay/tracks' ;
15
15
import { formatDateTimeFromTimestamp } from 'wcpay/utils/date-time' ;
16
+ import { getAdminUrl } from 'utils' ;
16
17
17
18
export const getUpdateBusinessDetailsTask = (
18
19
errorMessages : string [ ] ,
@@ -26,7 +27,6 @@ export const getUpdateBusinessDetailsTask = (
26
27
const accountDetailsPastDue = 'restricted' === status && pastDue ;
27
28
const hasMultipleErrors = 1 < errorMessages . length ;
28
29
const hasSingleError = 1 === errorMessages . length ;
29
- const connectUrl = wcpaySettings . connectUrl ;
30
30
const accountLinkWithSource = accountLink
31
31
? addQueryArgs ( accountLink , {
32
32
from : 'WCPAY_OVERVIEW' ,
@@ -120,12 +120,14 @@ export const getUpdateBusinessDetailsTask = (
120
120
source,
121
121
} ) ;
122
122
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.
125
124
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' ,
128
129
source : 'wcpay-finish-setup-task' ,
130
+ from : 'WCPAY_OVERVIEW' ,
129
131
} ) ;
130
132
} else {
131
133
window . open ( accountLinkWithSource , '_blank' ) ;
0 commit comments