mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
✨ Introduce new onboarding-options in JS hook
This commit is contained in:
parent
c0dbcf6884
commit
5919e45d1e
3 changed files with 22 additions and 10 deletions
|
@ -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 ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue