mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Disable vault setting if vaulting feature is not available in access token
This commit is contained in:
parent
e2cf37297a
commit
ccf357d790
6 changed files with 78 additions and 11 deletions
|
@ -133,7 +133,8 @@ return array(
|
|||
$webhook_registrar = $container->get( 'webhook.registrar' );
|
||||
$state = $container->get( 'onboarding.state' );
|
||||
$cache = new Cache( 'ppcp-paypal-bearer' );
|
||||
return new SettingsListener( $settings, $fields, $webhook_registrar, $cache, $state );
|
||||
$bearer = $container->get( 'api.bearer' );
|
||||
return new SettingsListener( $settings, $fields, $webhook_registrar, $cache, $state, $bearer );
|
||||
},
|
||||
'wcgateway.order-processor' => static function ( $container ): OrderProcessor {
|
||||
|
||||
|
@ -182,7 +183,6 @@ return array(
|
|||
'wcgateway.settings.fields' => static function ( $container ): array {
|
||||
|
||||
$state = $container->get( 'onboarding.state' );
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
$messages_disclaimers = $container->get( 'button.helper.messages-disclaimers' );
|
||||
|
||||
$fields = array(
|
||||
|
@ -634,8 +634,9 @@ return array(
|
|||
'title' => __( 'Vaulting', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'desc_tip' => true,
|
||||
'label' => sprintf(
|
||||
__('To use vaulting features, you must %1$senable vaulting on your account%2$s.', 'woocommerce-paypal-payments'),
|
||||
'label' => sprintf(
|
||||
// translators: %1$s and %2$s are the opening and closing of HTML <a> tag.
|
||||
__( 'To use vaulting features, you must %1$senable vaulting on your account%2$s.', 'woocommerce-paypal-payments' ),
|
||||
'<a
|
||||
href="https://docs.woocommerce.com/document/woocommerce-paypal-payments/#enable-vaulting-on-your-live-account"
|
||||
target="_blank"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue