mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-10 12:00:32 +08:00
Merge pull request #3134 from woocommerce/PCP-4243-prevent-navigation-on-incomplete-steps
Prevent navigation on incomplete steps (4243)
This commit is contained in:
commit
5c50aeb012
2 changed files with 6 additions and 2 deletions
|
@ -22,8 +22,13 @@ const StepBusiness = ( {} ) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect( () => {
|
useEffect( () => {
|
||||||
|
if ( ! businessChoice ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setIsCasualSeller( BUSINESS_TYPES.CASUAL_SELLER === businessChoice );
|
setIsCasualSeller( BUSINESS_TYPES.CASUAL_SELLER === businessChoice );
|
||||||
}, [ businessChoice, setIsCasualSeller ] );
|
}, [ businessChoice, setIsCasualSeller ] );
|
||||||
|
|
||||||
const { canUseSubscriptions } = OnboardingHooks.useFlags();
|
const { canUseSubscriptions } = OnboardingHooks.useFlags();
|
||||||
const businessChoices = [
|
const businessChoices = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,8 +36,7 @@ const ALL_STEPS = [
|
||||||
id: 'methods',
|
id: 'methods',
|
||||||
title: __( 'Choose checkout options', 'woocommerce-paypal-payments' ),
|
title: __( 'Choose checkout options', 'woocommerce-paypal-payments' ),
|
||||||
StepComponent: StepPaymentMethods,
|
StepComponent: StepPaymentMethods,
|
||||||
canProceed: ( { methods } ) =>
|
canProceed: ( { methods } ) => methods.optionalMethods !== null,
|
||||||
methods.areOptionalPaymentMethodsEnabled !== null,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'complete',
|
id: 'complete',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue