From 0e653aa3df79c209e854faef17c7eb0f293dc31a Mon Sep 17 00:00:00 2001 From: Narek Zakarian Date: Tue, 8 Nov 2022 16:38:48 +0400 Subject: [PATCH] Fix descriptions --- .../pay-later-tab-settings.php | 28 ++++++++++++++++--- .../src/Gateway/PayPalGateway.php | 11 +++++--- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/modules/ppcp-wc-gateway/pay-later-tab-settings.php b/modules/ppcp-wc-gateway/pay-later-tab-settings.php index a44b6a24d..ed1027e5f 100644 --- a/modules/ppcp-wc-gateway/pay-later-tab-settings.php +++ b/modules/ppcp-wc-gateway/pay-later-tab-settings.php @@ -41,6 +41,20 @@ return function ( ContainerInterface $container, array $fields ): array { }; $pay_later_fields = array( + 'pay_later_button_heading' => array( + 'heading' => __( 'Pay Later Button', 'woocommerce-paypal-payments' ), + 'type' => 'ppcp-heading', + 'screens' => array( State::STATE_ONBOARDED ), + 'requirements' => array( 'messages' ), + 'gateway' => Settings::PAY_LATER_TAB_ID, + 'description' => sprintf( + // translators: %1$s and %2$s are the opening and closing of HTML tag. + __( 'When enabled, a %1$sPay Later button%2$s is displayed for eligible customers.%3$sPayPal buttons must be enabled to display the Pay Later button.', 'woocommerce-paypal-payments' ), + '', + '', + '' + ), + ), 'pay_later_button_enabled' => array( 'title' => __( 'Enable/Disable', 'woocommerce-paypal-payments' ), 'type' => 'checkbox', @@ -58,7 +72,7 @@ return function ( ContainerInterface $container, array $fields ): array { 'input_class' => array( 'wc-enhanced-select' ), 'default' => array(), 'desc_tip' => false, - 'description' => __( 'Example description 1', 'woocommerce-paypal-payments' ), + 'description' => __( 'Select where the Pay Later button should be displayed.', 'woocommerce-paypal-payments' ), 'options' => $container->get( 'wcgateway.settings.pay-later.button-locations' ), 'screens' => array( State::STATE_ONBOARDED ), 'requirements' => array( 'messages' ), @@ -79,7 +93,13 @@ return function ( ContainerInterface $container, array $fields ): array { 'screens' => array( State::STATE_ONBOARDED ), 'requirements' => array( 'messages' ), 'gateway' => Settings::PAY_LATER_TAB_ID, - 'description' => __( 'Example description. 2', 'woocommerce-paypal-payments' ), + 'description' => sprintf( + // translators: %1$s and %2$s are the opening and closing of HTML tag. + __( 'When enabled, PayPal displays %1$sPay Later messaging%2$s for eligible customers.', 'woocommerce-paypal-payments' ), + '', + '', + '' + ), ), 'pay_later_messaging_enabled' => array( 'title' => __( 'Enable/Disable', 'woocommerce-paypal-payments' ), @@ -98,7 +118,7 @@ return function ( ContainerInterface $container, array $fields ): array { 'input_class' => array( 'wc-enhanced-select' ), 'default' => array(), 'desc_tip' => false, - 'description' => __( 'Example description 3', 'woocommerce-paypal-payments' ), + 'description' => __( 'Select where the Pay Later messaging should be displayed.', 'woocommerce-paypal-payments' ), 'options' => $container->get( 'wcgateway.settings.pay-later.messaging-locations' ), 'screens' => array( State::STATE_ONBOARDED ), 'requirements' => array( 'messages' ), @@ -107,7 +127,7 @@ return function ( ContainerInterface $container, array $fields ): array { 'pay_later_enable_styling_per_messaging_location' => array( 'title' => __( 'Enable Styling Per Messaging Location', 'woocommerce-paypal-payments' ), 'type' => 'checkbox', - 'label' => __( 'Enable', 'woocommerce-paypal-payments' ), + 'label' => __( 'Enable individualized styling for Pay Later messaging offers', 'woocommerce-paypal-payments' ), 'default' => false, 'screens' => array( State::STATE_ONBOARDED ), 'requirements' => array( 'messages' ), diff --git a/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php b/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php index 4ae80c556..a6a3832a4 100644 --- a/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php +++ b/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php @@ -297,7 +297,7 @@ class PayPalGateway extends \WC_Payment_Gateway { return __( 'Advanced Card Processing', 'woocommerce-paypal-payments' ); } if ( $this->is_pay_later_tab() ) { - return __( 'Pay Later Button', 'woocommerce-paypal-payments' ); + return __( 'PayPal Pay Later', 'woocommerce-paypal-payments' ); } if ( $this->is_paypal_tab() ) { return __( 'Standard Payments', 'woocommerce-paypal-payments' ); @@ -327,9 +327,12 @@ class PayPalGateway extends \WC_Payment_Gateway { } if ( $this->is_pay_later_tab() ) { - return __( - 'Example description.', - 'woocommerce-paypal-payments' + return sprintf( + // translators: %1$s and %2$s are the opening and closing of HTML tag. + __( 'Let customers pay over time while you get paid up front — at no additional cost. %1$sVisit the documentation%2$s to learn more about Pay Later offers from PayPal.', 'woocommerce-paypal-payments' ), + '', + '', + '' ); }