mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +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( () => {
|
||||
if ( ! businessChoice ) {
|
||||
return;
|
||||
}
|
||||
|
||||
setIsCasualSeller( BUSINESS_TYPES.CASUAL_SELLER === businessChoice );
|
||||
}, [ businessChoice, setIsCasualSeller ] );
|
||||
|
||||
const { canUseSubscriptions } = OnboardingHooks.useFlags();
|
||||
const businessChoices = [
|
||||
{
|
||||
|
|
|
@ -36,8 +36,7 @@ const ALL_STEPS = [
|
|||
id: 'methods',
|
||||
title: __( 'Choose checkout options', 'woocommerce-paypal-payments' ),
|
||||
StepComponent: StepPaymentMethods,
|
||||
canProceed: ( { methods } ) =>
|
||||
methods.areOptionalPaymentMethodsEnabled !== null,
|
||||
canProceed: ( { methods } ) => methods.optionalMethods !== null,
|
||||
},
|
||||
{
|
||||
id: 'complete',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue