Add notice if subscription is active

This commit is contained in:
carmenmaymo 2025-02-11 14:13:53 +01:00
parent b500e3452a
commit afe05d4697
No known key found for this signature in database
GPG key ID: 6023F686B0F3102E

View file

@ -24,6 +24,26 @@ const StepBusiness = ( {} ) => {
useEffect( () => {
setIsCasualSeller( BUSINESS_TYPES.CASUAL_SELLER === businessChoice );
}, [ businessChoice, setIsCasualSeller ] );
const { canUseSubscriptions } = OnboardingHooks.useFlags();
const businessChoices = [
{
value: BUSINESS_TYPES.BUSINESS,
title: __( 'Business', 'woocommerce-paypal-payments' ),
description: __(
'Recommended for individuals and organizations that primarily use PayPal to sell goods or services or receive donations, even if your business is not incorporated.',
'woocommerce-paypal-payments'
),
},
{
value: BUSINESS_TYPES.CASUAL_SELLER,
title: __( 'Personal Account', 'woocommerce-paypal-payments' ),
description: __(
'Ideal for those who primarily make purchases or send personal transactions to family and friends.',
'woocommerce-paypal-payments'
),
contents: canUseSubscriptions ? <DetailsAccountType /> : null,
},
];
return (
<div className="ppcp-r-page-business">
@ -45,23 +65,13 @@ const StepBusiness = ( {} ) => {
);
};
const businessChoices = [
{
value: BUSINESS_TYPES.BUSINESS,
title: __( 'Business', 'woocommerce-paypal-payments' ),
description: __(
'Recommended for individuals and organizations that primarily use PayPal to sell goods or services or receive donations, even if your business is not incorporated.',
const DetailsAccountType = () => (
<p>
{ __(
'* Business account is required for subscriptions.',
'woocommerce-paypal-payments'
),
},
{
value: BUSINESS_TYPES.CASUAL_SELLER,
title: __( 'Personal Account', 'woocommerce-paypal-payments' ),
description: __(
'Ideal for those who primarily make purchases or send personal transactions to family and friends.',
'woocommerce-paypal-payments'
),
},
];
) }
</p>
);
export default StepBusiness;