Merge pull request #3162 from woocommerce/PCP-4252-subscriptions-product-without-reference-transactions-but-with-acdc

Subscriptions product without reference transactions but with ACDC  (4252)
This commit is contained in:
Emili Castells 2025-02-27 12:50:12 +01:00 committed by GitHub
commit 59524bbe71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,6 +3,7 @@ import { __, sprintf } from '@wordpress/i18n';
import SettingsBlock from '../../../../../ReusableComponents/SettingsBlock';
import { ControlToggleButton } from '../../../../../ReusableComponents/Controls';
import { SettingsHooks } from '../../../../../../data';
import { useMerchantInfo } from '../../../../../../data/common/hooks';
const SavePaymentMethods = () => {
const {
@ -12,6 +13,8 @@ const SavePaymentMethods = () => {
setSaveCardDetails,
} = SettingsHooks.useSettings();
const { features } = useMerchantInfo();
return (
<SettingsBlock
title={ __(
@ -38,8 +41,13 @@ const SavePaymentMethods = () => {
'https://woocommerce.com/document/woocommerce-paypal-payments/#pay-later',
'https://woocommerce.com/document/woocommerce-paypal-payments/#alternative-payment-methods'
) }
value={ savePaypalAndVenmo }
value={
features.save_paypal_and_venmo.enabled
? savePaypalAndVenmo
: false
}
onChange={ setSavePaypalAndVenmo }
disabled={ ! features.save_paypal_and_venmo.enabled }
/>
<ControlToggleButton