Merge pull request #3134 from woocommerce/PCP-4243-prevent-navigation-on-incomplete-steps

Prevent navigation on incomplete steps (4243)
This commit is contained in:
Emili Castells 2025-02-20 12:53:55 +01:00 committed by GitHub
commit 5c50aeb012
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -22,8 +22,13 @@ const StepBusiness = ( {} ) => {
);
useEffect( () => {
if ( ! businessChoice ) {
return;
}
setIsCasualSeller( BUSINESS_TYPES.CASUAL_SELLER === businessChoice );
}, [ businessChoice, setIsCasualSeller ] );
const { canUseSubscriptions } = OnboardingHooks.useFlags();
const businessChoices = [
{

View file

@ -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',