Introduce new onboarding-options in JS hook

This commit is contained in:
Philipp Stracker 2025-02-21 21:12:20 +01:00
parent c0dbcf6884
commit 5919e45d1e
No known key found for this signature in database
3 changed files with 22 additions and 10 deletions

View file

@ -30,7 +30,7 @@ const ACTIVITIES = {
export const useHandleOnboardingButton = ( isSandbox ) => {
const { sandboxOnboardingUrl } = CommonHooks.useSandbox();
const { productionOnboardingUrl } = CommonHooks.useProduction();
const products = OnboardingHooks.useDetermineProducts();
const { products, options } = OnboardingHooks.useDetermineProducts();
const { startActivity } = CommonHooks.useBusyState();
const { authenticateWithOAuth } = CommonHooks.useAuthentication();
const [ onboardingUrl, setOnboardingUrl ] = useState( '' );
@ -43,7 +43,7 @@ export const useHandleOnboardingButton = ( isSandbox ) => {
if ( isSandbox ) {
res = await sandboxOnboardingUrl();
} else {
res = await productionOnboardingUrl( products );
res = await productionOnboardingUrl( products, options );
}
if ( res.success && res.data ) {