mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
Display subscription mode option name instead of value in status report
This commit is contained in:
parent
ac8459f47e
commit
a4bccbbb12
2 changed files with 9 additions and 6 deletions
|
@ -404,7 +404,6 @@ return array(
|
|||
'wcgateway.admin.fees-renderer' => static function ( ContainerInterface $container ): FeesRenderer {
|
||||
return new FeesRenderer();
|
||||
},
|
||||
|
||||
'wcgateway.settings.should-render-settings' => static function ( ContainerInterface $container ): bool {
|
||||
|
||||
$sections = array(
|
||||
|
@ -419,13 +418,15 @@ return array(
|
|||
|
||||
return array_key_exists( $current_page_id, $sections );
|
||||
},
|
||||
|
||||
'wcgateway.settings.fields.subscriptions_mode' => static function ( ContainerInterface $container ): array {
|
||||
$subscription_mode_options = array(
|
||||
'wcgateway.settings.fields.subscriptions_mode_options' => static function ( ContainerInterface $container ): array {
|
||||
return array(
|
||||
'vaulting_api' => __( 'PayPal Vaulting', 'woocommerce-paypal-payments' ),
|
||||
'subscriptions_api' => __( 'PayPal Subscriptions', 'woocommerce-paypal-payments' ),
|
||||
'disable_paypal_subscriptions' => __( 'Disable PayPal for subscriptions', 'woocommerce-paypal-payments' ),
|
||||
);
|
||||
},
|
||||
'wcgateway.settings.fields.subscriptions_mode' => static function ( ContainerInterface $container ): array {
|
||||
$subscription_mode_options = $container->get( 'wcgateway.settings.fields.subscriptions_mode_options' );
|
||||
|
||||
$billing_agreements_endpoint = $container->get( 'api.endpoint.billing-agreements' );
|
||||
$reference_transaction_enabled = $billing_agreements_endpoint->reference_transaction_enabled();
|
||||
|
@ -440,7 +441,7 @@ return array(
|
|||
'input_class' => array( 'wc-enhanced-select' ),
|
||||
'desc_tip' => true,
|
||||
'description' => __( 'Utilize PayPal Vaulting for flexible subscription processing with saved payment methods, create “PayPal Subscriptions” to bill customers at regular intervals, or disable PayPal for subscription-type products.', 'woocommerce-paypal-payments' ),
|
||||
'default' => 'vaulting_api',
|
||||
'default' => array_key_first( $subscription_mode_options ),
|
||||
'options' => $subscription_mode_options,
|
||||
'screens' => array(
|
||||
State::STATE_ONBOARDED,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue