mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Merge pull request #729 from woocommerce/PCP-688-add-functionality-to-choose-subscription-failure-behavior
Functionality to choose subscription failure behavior
This commit is contained in:
commit
e638d91687
11 changed files with 329 additions and 109 deletions
|
@ -402,7 +402,7 @@ return array(
|
|||
assert( $onboarding_options_renderer instanceof OnboardingOptionsRenderer );
|
||||
|
||||
$fields = array(
|
||||
'checkout_settings_heading' => array(
|
||||
'checkout_settings_heading' => array(
|
||||
'heading' => __( 'PayPal Checkout Settings', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-heading',
|
||||
'screens' => array(
|
||||
|
@ -412,7 +412,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'title' => array(
|
||||
'title' => array(
|
||||
'title' => __( 'Title', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'text',
|
||||
'description' => __(
|
||||
|
@ -428,7 +428,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'dcc_enabled' => array(
|
||||
'dcc_enabled' => array(
|
||||
'title' => __( 'Enable/Disable', 'woocommerce-paypal-payments' ),
|
||||
'desc_tip' => true,
|
||||
'description' => __( 'Once enabled, the Credit Card option will show up in the checkout.', 'woocommerce-paypal-payments' ),
|
||||
|
@ -443,7 +443,7 @@ return array(
|
|||
State::STATE_ONBOARDED,
|
||||
),
|
||||
),
|
||||
'dcc_gateway_title' => array(
|
||||
'dcc_gateway_title' => array(
|
||||
'title' => __( 'Title', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'text',
|
||||
'description' => __(
|
||||
|
@ -460,7 +460,7 @@ return array(
|
|||
),
|
||||
'gateway' => 'dcc',
|
||||
),
|
||||
'description' => array(
|
||||
'description' => array(
|
||||
'title' => __( 'Description', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'text',
|
||||
'desc_tip' => true,
|
||||
|
@ -479,7 +479,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'intent' => array(
|
||||
'intent' => array(
|
||||
'title' => __( 'Intent', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -501,7 +501,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'capture_for_virtual_only' => array(
|
||||
'capture_for_virtual_only' => array(
|
||||
'title' => __( 'Capture Virtual-Only Orders ', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'default' => false,
|
||||
|
@ -518,7 +518,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'payee_preferred' => array(
|
||||
'payee_preferred' => array(
|
||||
'title' => __( 'Instant Payments ', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'default' => false,
|
||||
|
@ -535,7 +535,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'brand_name' => array(
|
||||
'brand_name' => array(
|
||||
'title' => __( 'Brand Name', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'text',
|
||||
'default' => get_bloginfo( 'name' ),
|
||||
|
@ -551,7 +551,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'landing_page' => array(
|
||||
'landing_page' => array(
|
||||
'title' => __( 'Landing Page', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -573,7 +573,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'disable_funding' => array(
|
||||
'disable_funding' => array(
|
||||
'title' => __( 'Hide Funding Source(s)', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-multiselect',
|
||||
'class' => array(),
|
||||
|
@ -597,7 +597,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'vault_enabled' => array(
|
||||
'vault_enabled' => array(
|
||||
'title' => __( 'Vaulting', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'desc_tip' => true,
|
||||
|
@ -611,7 +611,27 @@ return array(
|
|||
'gateway' => array( 'paypal', 'dcc' ),
|
||||
'input_class' => $container->get( 'wcgateway.helper.vaulting-scope' ) ? array() : array( 'ppcp-disabled-checkbox' ),
|
||||
),
|
||||
'card_billing_data_mode' => array(
|
||||
'subscription_behavior_when_vault_fails' => array(
|
||||
'title' => __( 'Subscription capture behavior if Vault fails', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
'input_class' => array( 'wc-enhanced-select' ),
|
||||
'default' => 'void_auth',
|
||||
'desc_tip' => true,
|
||||
'description' => __( 'By default, subscription payments are captured only when saving the payment method was successful. Without a saved payment method, automatic renewal payments are not possible.', 'woocommerce-paypal-payments' ),
|
||||
'description_with_tip' => __( 'Determines whether authorized payments for subscription orders are captured or voided if there is no saved payment method. This only applies when the intent Capture is used for the subscription order.', 'woocommerce-paypal-payments' ),
|
||||
'options' => array(
|
||||
'void_auth' => __( 'Void authorization & fail the order/subscription', 'woocommerce-paypal-payments' ),
|
||||
'capture_auth' => __( 'Capture authorized payment & set subscription to Manual Renewal', 'woocommerce-paypal-payments' ),
|
||||
'capture_auth_ignore' => __( 'Capture authorized payment & disregard missing payment method', 'woocommerce-paypal-payments' ),
|
||||
),
|
||||
'screens' => array(
|
||||
State::STATE_ONBOARDED,
|
||||
),
|
||||
'requirements' => array(),
|
||||
'gateway' => array( 'paypal', 'dcc' ),
|
||||
),
|
||||
'card_billing_data_mode' => array(
|
||||
'title' => __( 'Card billing data handling', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -631,7 +651,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => array( 'paypal', CardButtonGateway::ID ),
|
||||
),
|
||||
'allow_card_button_gateway' => array(
|
||||
'allow_card_button_gateway' => array(
|
||||
'title' => __( 'Separate Card Button from PayPal gateway', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'desc_tip' => true,
|
||||
|
@ -647,7 +667,7 @@ return array(
|
|||
),
|
||||
|
||||
// General button styles.
|
||||
'button_style_heading' => array(
|
||||
'button_style_heading' => array(
|
||||
'heading' => __( 'Checkout', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-heading',
|
||||
'screens' => array(
|
||||
|
@ -658,7 +678,7 @@ return array(
|
|||
'gateway' => 'paypal',
|
||||
'description' => __( 'Customize the appearance of PayPal Checkout on the checkout page.', 'woocommerce-paypal-payments' ),
|
||||
),
|
||||
'button_enabled' => array(
|
||||
'button_enabled' => array(
|
||||
'title' => __( 'Enable buttons on Checkout', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable on Checkout', 'woocommerce-paypal-payments' ),
|
||||
|
@ -670,7 +690,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_layout' => array(
|
||||
'button_layout' => array(
|
||||
'title' => __( 'Button Layout', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -692,7 +712,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_tagline' => array(
|
||||
'button_tagline' => array(
|
||||
'title' => __( 'Tagline', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'default' => true,
|
||||
|
@ -709,7 +729,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_label' => array(
|
||||
'button_label' => array(
|
||||
'title' => __( 'Button Label', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -736,7 +756,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_color' => array(
|
||||
'button_color' => array(
|
||||
'title' => __( 'Color', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -760,7 +780,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_shape' => array(
|
||||
'button_shape' => array(
|
||||
'title' => __( 'Shape', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -782,7 +802,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_heading' => array(
|
||||
'message_heading' => array(
|
||||
'heading' => __( 'Pay Later on Checkout', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-heading',
|
||||
'screens' => array(
|
||||
|
@ -794,7 +814,7 @@ return array(
|
|||
'description' => str_replace( '<a>', '<a href="' . $messages_disclaimers->link_for_country() . '" target="_blank">', __( 'Displays Pay Later messaging for available offers. Restrictions apply. <a>Click here to learn more</a>. Pay Later button will show for eligible buyers and PayPal determines eligibility.', 'woocommerce-paypal-payments' ) ),
|
||||
'class' => array( 'ppcp-subheading' ),
|
||||
),
|
||||
'message_enabled' => array(
|
||||
'message_enabled' => array(
|
||||
'title' => __( 'Enable message on Checkout', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'label' => sprintf( $container->get( 'wcgateway.settings.fields.pay-later-label' ), __( 'Enable on Checkout', 'woocommerce-paypal-payments' ) ),
|
||||
|
@ -806,7 +826,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_layout' => array(
|
||||
'message_layout' => array(
|
||||
'title' => __( 'Pay Later Messaging layout', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -828,7 +848,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_logo' => array(
|
||||
'message_logo' => array(
|
||||
'title' => __( 'Pay Later Messaging logo', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -852,7 +872,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_position' => array(
|
||||
'message_position' => array(
|
||||
'title' => __( 'Pay Later Messaging logo position', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -875,7 +895,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_color' => array(
|
||||
'message_color' => array(
|
||||
'title' => __( 'Pay Later Messaging text color', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -899,7 +919,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_flex_color' => array(
|
||||
'message_flex_color' => array(
|
||||
'title' => __( 'Pay Later Messaging color', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -926,7 +946,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_flex_ratio' => array(
|
||||
'message_flex_ratio' => array(
|
||||
'title' => __( 'Pay Later Messaging ratio', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -952,7 +972,7 @@ return array(
|
|||
),
|
||||
|
||||
// Single product page.
|
||||
'button_product_heading' => array(
|
||||
'button_product_heading' => array(
|
||||
'heading' => __( 'Single Product Page', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-heading',
|
||||
'screens' => array(
|
||||
|
@ -963,7 +983,7 @@ return array(
|
|||
'gateway' => 'paypal',
|
||||
'description' => __( 'Customize the appearance of PayPal Checkout on the single product page.', 'woocommerce-paypal-payments' ),
|
||||
),
|
||||
'button_product_enabled' => array(
|
||||
'button_product_enabled' => array(
|
||||
'title' => __( 'Enable buttons on Single Product', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable on Single Product', 'woocommerce-paypal-payments' ),
|
||||
|
@ -975,7 +995,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_product_layout' => array(
|
||||
'button_product_layout' => array(
|
||||
'title' => __( 'Button Layout', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -997,7 +1017,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_product_tagline' => array(
|
||||
'button_product_tagline' => array(
|
||||
'title' => __( 'Tagline', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable tagline', 'woocommerce-paypal-payments' ),
|
||||
|
@ -1014,7 +1034,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_product_label' => array(
|
||||
'button_product_label' => array(
|
||||
'title' => __( 'Button Label', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1041,7 +1061,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_product_color' => array(
|
||||
'button_product_color' => array(
|
||||
'title' => __( 'Color', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1065,7 +1085,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_product_shape' => array(
|
||||
'button_product_shape' => array(
|
||||
'title' => __( 'Shape', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1088,7 +1108,7 @@ return array(
|
|||
'gateway' => 'paypal',
|
||||
),
|
||||
|
||||
'message_product_heading' => array(
|
||||
'message_product_heading' => array(
|
||||
'heading' => __( 'Pay Later on Single Product Page', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-heading',
|
||||
'screens' => array(
|
||||
|
@ -1100,7 +1120,7 @@ return array(
|
|||
'description' => str_replace( '<a>', '<a href="' . $messages_disclaimers->link_for_country() . '" target="_blank">', __( 'Displays Pay Later messaging for available offers. Restrictions apply. <a>Click here to learn more</a>. Pay Later button will show for eligible buyers and PayPal determines eligibility.', 'woocommerce-paypal-payments' ) ),
|
||||
'class' => array( 'ppcp-subheading' ),
|
||||
),
|
||||
'message_product_enabled' => array(
|
||||
'message_product_enabled' => array(
|
||||
'title' => __( 'Enable message on Single Product', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'label' => sprintf( $container->get( 'wcgateway.settings.fields.pay-later-label' ), __( 'Enable on Single Product', 'woocommerce-paypal-payments' ) ),
|
||||
|
@ -1112,7 +1132,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_product_layout' => array(
|
||||
'message_product_layout' => array(
|
||||
'title' => __( 'Pay Later Messaging layout', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1134,7 +1154,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_product_logo' => array(
|
||||
'message_product_logo' => array(
|
||||
'title' => __( 'Pay Later Messaging logo', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1158,7 +1178,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_product_position' => array(
|
||||
'message_product_position' => array(
|
||||
'title' => __( 'Pay Later Messaging logo position', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1181,7 +1201,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_product_color' => array(
|
||||
'message_product_color' => array(
|
||||
'title' => __( 'Pay Later Messaging text color', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1205,7 +1225,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_product_flex_color' => array(
|
||||
'message_product_flex_color' => array(
|
||||
'title' => __( 'Pay Later Messaging color', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1232,7 +1252,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_product_flex_ratio' => array(
|
||||
'message_product_flex_ratio' => array(
|
||||
'title' => __( 'Pay Later Messaging ratio', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1258,7 +1278,7 @@ return array(
|
|||
),
|
||||
|
||||
// Cart settings.
|
||||
'button_cart_heading' => array(
|
||||
'button_cart_heading' => array(
|
||||
'heading' => __( 'Cart', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-heading',
|
||||
'screens' => array(
|
||||
|
@ -1269,7 +1289,7 @@ return array(
|
|||
'gateway' => 'paypal',
|
||||
'description' => __( 'Customize the appearance of PayPal Checkout on the cart page.', 'woocommerce-paypal-payments' ),
|
||||
),
|
||||
'button_cart_enabled' => array(
|
||||
'button_cart_enabled' => array(
|
||||
'title' => __( 'Buttons on Cart', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable on Cart', 'woocommerce-paypal-payments' ),
|
||||
|
@ -1281,7 +1301,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_cart_layout' => array(
|
||||
'button_cart_layout' => array(
|
||||
'title' => __( 'Button Layout', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1303,7 +1323,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_cart_tagline' => array(
|
||||
'button_cart_tagline' => array(
|
||||
'title' => __( 'Tagline', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable tagline', 'woocommerce-paypal-payments' ),
|
||||
|
@ -1320,7 +1340,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_cart_label' => array(
|
||||
'button_cart_label' => array(
|
||||
'title' => __( 'Button Label', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1347,7 +1367,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_cart_color' => array(
|
||||
'button_cart_color' => array(
|
||||
'title' => __( 'Color', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1371,7 +1391,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_cart_shape' => array(
|
||||
'button_cart_shape' => array(
|
||||
'title' => __( 'Shape', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1394,7 +1414,7 @@ return array(
|
|||
'gateway' => 'paypal',
|
||||
),
|
||||
|
||||
'message_cart_heading' => array(
|
||||
'message_cart_heading' => array(
|
||||
'heading' => __( 'Pay Later on Cart', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-heading',
|
||||
'screens' => array(
|
||||
|
@ -1406,7 +1426,7 @@ return array(
|
|||
'description' => str_replace( '<a>', '<a href="' . $messages_disclaimers->link_for_country() . '" target="_blank">', __( 'Displays Pay Later messaging for available offers. Restrictions apply. <a>Click here to learn more</a>. Pay Later button will show for eligible buyers and PayPal determines eligibility.', 'woocommerce-paypal-payments' ) ),
|
||||
'class' => array( 'ppcp-subheading' ),
|
||||
),
|
||||
'message_cart_enabled' => array(
|
||||
'message_cart_enabled' => array(
|
||||
'title' => __( 'Enable message on Cart', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'label' => sprintf( $container->get( 'wcgateway.settings.fields.pay-later-label' ), __( 'Enable on Cart', 'woocommerce-paypal-payments' ) ),
|
||||
|
@ -1418,7 +1438,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_cart_layout' => array(
|
||||
'message_cart_layout' => array(
|
||||
'title' => __( 'Pay Later Messaging layout', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1440,7 +1460,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_cart_logo' => array(
|
||||
'message_cart_logo' => array(
|
||||
'title' => __( 'Pay Later Messaging logo', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1464,7 +1484,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_cart_position' => array(
|
||||
'message_cart_position' => array(
|
||||
'title' => __( 'Pay Later Messaging logo position', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1487,7 +1507,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_cart_color' => array(
|
||||
'message_cart_color' => array(
|
||||
'title' => __( 'Pay Later Messaging text color', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1511,7 +1531,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_cart_flex_color' => array(
|
||||
'message_cart_flex_color' => array(
|
||||
'title' => __( 'Pay Later Messaging color', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1538,7 +1558,7 @@ return array(
|
|||
'requirements' => array( 'messages' ),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'message_cart_flex_ratio' => array(
|
||||
'message_cart_flex_ratio' => array(
|
||||
'title' => __( 'Pay Later Messaging ratio', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1564,7 +1584,7 @@ return array(
|
|||
),
|
||||
|
||||
// Mini cart settings.
|
||||
'button_mini-cart_heading' => array(
|
||||
'button_mini-cart_heading' => array(
|
||||
'heading' => __( 'Mini Cart', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-heading',
|
||||
'screens' => array(
|
||||
|
@ -1575,7 +1595,7 @@ return array(
|
|||
'gateway' => 'paypal',
|
||||
'description' => __( 'Customize the appearance of PayPal Checkout on the Mini Cart.', 'woocommerce-paypal-payments' ),
|
||||
),
|
||||
'button_mini-cart_enabled' => array(
|
||||
'button_mini-cart_enabled' => array(
|
||||
'title' => __( 'Buttons on Mini Cart', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable on Mini Cart', 'woocommerce-paypal-payments' ),
|
||||
|
@ -1587,7 +1607,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_mini-cart_layout' => array(
|
||||
'button_mini-cart_layout' => array(
|
||||
'title' => __( 'Button Layout', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1609,7 +1629,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_mini-cart_tagline' => array(
|
||||
'button_mini-cart_tagline' => array(
|
||||
'title' => __( 'Tagline', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable tagline', 'woocommerce-paypal-payments' ),
|
||||
|
@ -1626,7 +1646,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_mini-cart_label' => array(
|
||||
'button_mini-cart_label' => array(
|
||||
'title' => __( 'Button Label', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1653,7 +1673,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_mini-cart_color' => array(
|
||||
'button_mini-cart_color' => array(
|
||||
'title' => __( 'Color', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1677,7 +1697,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_mini-cart_shape' => array(
|
||||
'button_mini-cart_shape' => array(
|
||||
'title' => __( 'Shape', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'class' => array(),
|
||||
|
@ -1699,7 +1719,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_mini-cart_height' => array(
|
||||
'button_mini-cart_height' => array(
|
||||
'title' => __( 'Button Height', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'number',
|
||||
'default' => '35',
|
||||
|
@ -1713,7 +1733,7 @@ return array(
|
|||
'gateway' => 'paypal',
|
||||
),
|
||||
|
||||
'disable_cards' => array(
|
||||
'disable_cards' => array(
|
||||
'title' => __( 'Disable specific credit cards', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-multiselect',
|
||||
'class' => array(),
|
||||
|
@ -1741,7 +1761,7 @@ return array(
|
|||
),
|
||||
'gateway' => 'dcc',
|
||||
),
|
||||
'card_icons' => array(
|
||||
'card_icons' => array(
|
||||
'title' => __( 'Show logo of the following credit cards', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-multiselect',
|
||||
'class' => array(),
|
||||
|
@ -1771,7 +1791,7 @@ return array(
|
|||
),
|
||||
'gateway' => 'dcc',
|
||||
),
|
||||
'3d_secure_heading' => array(
|
||||
'3d_secure_heading' => array(
|
||||
'heading' => __( '3D Secure', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-heading',
|
||||
'description' => wp_kses_post(
|
||||
|
@ -1799,7 +1819,7 @@ return array(
|
|||
),
|
||||
'gateway' => 'dcc',
|
||||
),
|
||||
'3d_secure_contingency' => array(
|
||||
'3d_secure_contingency' => array(
|
||||
'title' => __( 'Contingency for 3D Secure', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'select',
|
||||
'description' => sprintf(
|
||||
|
@ -2069,7 +2089,12 @@ return array(
|
|||
},
|
||||
|
||||
'button.helper.vaulting-label' => static function ( ContainerInterface $container ): string {
|
||||
$vaulting_label = __( 'Enable saved cards and subscription features on your store.', 'woocommerce-paypal-payments' );
|
||||
$vaulting_label = sprintf(
|
||||
// translators: %1$s and %2$s are the opening and closing of HTML <a> tag.
|
||||
__( 'Enable saved cards, PayPal accounts, and subscription features on your store. Payment methods are saved in the secure %1$sPayPal Vault%2$s.', 'woocommerce-paypal-payments' ),
|
||||
'<a href="https://woocommerce.com/document/woocommerce-paypal-payments/#vaulting-saving-a-payment-method" target="_blank">',
|
||||
'</a>'
|
||||
);
|
||||
|
||||
if ( ! $container->get( 'wcgateway.helper.vaulting-scope' ) ) {
|
||||
$vaulting_label .= sprintf(
|
||||
|
@ -2084,7 +2109,20 @@ return array(
|
|||
}
|
||||
|
||||
$vaulting_label .= '<p class="description">';
|
||||
$vaulting_label .= __( 'This will disable all Pay Later messaging on your site.', 'woocommerce-paypal-payments' );
|
||||
$vaulting_label .= sprintf(
|
||||
// translators: %1$s, %2$s, %3$s and %4$s are the opening and closing of HTML <a> tag.
|
||||
__( 'This will disable all %1$sPay Later%2$s features and %3$sAlternative Payment Methods%4$s on your site.', 'woocommerce-paypal-payments' ),
|
||||
'<a
|
||||
href="https://woocommerce.com/document/woocommerce-paypal-payments/#pay-later"
|
||||
target="_blank"
|
||||
>',
|
||||
'</a>',
|
||||
'<a
|
||||
href="https://woocommerce.com/document/woocommerce-paypal-payments/#alternative-payment-methods"
|
||||
target="_blank"
|
||||
>',
|
||||
'</a>'
|
||||
);
|
||||
$vaulting_label .= '</p>';
|
||||
|
||||
return $vaulting_label;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue