Merge branch 'trunk' into PCP-915-create-pay-later-tab

# Conflicts:
#	modules/ppcp-wc-gateway/services.php
This commit is contained in:
Narek Zakarian 2022-10-31 16:07:17 +04:00
commit 3e82fd9996
17 changed files with 766 additions and 69 deletions

View file

@ -347,14 +347,19 @@ return function ( ContainerInterface $container, array $fields ): array {
),
'credentials_feature_onboarding_heading' => array(
'heading' => __( 'Feature Onboarding', 'woocommerce-paypal-payments' ),
'heading' => __( 'Advanced feature availability & sign-up', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-heading',
'screens' => array(
State::STATE_ONBOARDED,
),
'requirements' => array(),
'gateway' => Settings::CONNECTION_TAB_ID,
'description' => __( 'See which features are available.', 'woocommerce-paypal-payments' ),
'description' => sprintf(
// translators: %1$s and %2$s are the opening and closing of HTML <a> tag.
__( 'Displays whether available advanced features are enabled for the connected PayPal account. More information about advanced features is available in the %1$sFeature sign-up documentation%2$s.', 'woocommerce-paypal-payments' ),
'<a href="https://woocommerce.com/document/woocommerce-paypal-payments/#feature-signup" target="_blank">',
'</a>'
),
),
'ppcp_dcc_status' => array(
'title' => __( 'Advanced Credit and Debit Card Payments', 'woocommerce-paypal-payments' ),
@ -367,7 +372,7 @@ return function ( ContainerInterface $container, array $fields ): array {
'gateway' => Settings::CONNECTION_TAB_ID,
),
'ppcp_pui_status' => array(
'title' => __( 'Pay Upon Invoice', 'woocommerce-paypal-payments' ),
'title' => __( 'Pay upon Invoice', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-text',
'text' => $container->get( 'wcgateway.settings.connection.pui-status-text' ),
'screens' => array(
@ -377,7 +382,7 @@ return function ( ContainerInterface $container, array $fields ): array {
'gateway' => Settings::CONNECTION_TAB_ID,
),
'tracking_enabled' => array(
'title' => __( 'Tracking', 'woocommerce-paypal-payments' ),
'title' => __( 'Shipment Tracking', 'woocommerce-paypal-payments' ),
'type' => 'checkbox',
'desc_tip' => true,
'label' => $container->get( 'wcgateway.settings.tracking-label' ),
@ -392,14 +397,19 @@ return function ( ContainerInterface $container, array $fields ): array {
),
'credentials_integration_configuration_heading' => array(
'heading' => __( 'Integration configuration', 'woocommerce-paypal-payments' ),
'heading' => __( 'General integration configuration', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-heading',
'screens' => array(
State::STATE_ONBOARDED,
),
'requirements' => array(),
'gateway' => Settings::CONNECTION_TAB_ID,
'description' => __( 'See which features are available.', 'woocommerce-paypal-payments' ),
'description' => sprintf(
// translators: %1$s and %2$s are the opening and closing of HTML <a> tag.
__( 'Configure integration specific settings such as a unique invoice prefix, or logging for potential %1$stroubleshooting%2$s.', 'woocommerce-paypal-payments' ),
'<a href="https://woocommerce.com/document/woocommerce-paypal-payments/#troubleshooting" target="_blank">',
'</a>'
),
),
'prefix' => array(
'title' => __( 'Invoice prefix', 'woocommerce-paypal-payments' ),

View file

@ -690,7 +690,7 @@ return array(
// General button styles.
'button_style_heading' => array(
'heading' => __( 'Checkout', 'woocommerce-paypal-payments' ),
'heading' => __( 'Checkout Buttons', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-heading',
'screens' => array(
State::STATE_START,
@ -698,7 +698,12 @@ return array(
),
'requirements' => array(),
'gateway' => 'paypal',
'description' => __( 'Customize the appearance of Standard Payments on the checkout page.', 'woocommerce-paypal-payments' ),
'description' => sprintf(
// translators: %1$s and %2$s are the opening and closing of HTML <a> tag.
__( 'Customize the appearance of the PayPal smart buttons on the %1$sCheckout page%2$s.', 'woocommerce-paypal-payments' ),
'<a href="https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-checkout" target="_blank">',
'</a>'
),
),
'button_enabled' => array(
'title' => __( 'Enable buttons on Checkout', 'woocommerce-paypal-payments' ),
@ -767,7 +772,7 @@ return array(
),
'options' => array(
'paypal' => __( 'PayPal', 'woocommerce-paypal-payments' ),
'checkout' => __( 'Standard Payments', 'woocommerce-paypal-payments' ),
'checkout' => __( 'Checkout', 'woocommerce-paypal-payments' ),
'buynow' => __( 'PayPal Buy Now', 'woocommerce-paypal-payments' ),
'pay' => __( 'Pay with PayPal', 'woocommerce-paypal-payments' ),
),
@ -827,7 +832,7 @@ return array(
// Single product page.
'button_product_heading' => array(
'heading' => __( 'Single Product Page', 'woocommerce-paypal-payments' ),
'heading' => __( 'Single Product Page Buttons', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-heading',
'screens' => array(
State::STATE_START,
@ -835,7 +840,12 @@ return array(
),
'requirements' => array(),
'gateway' => 'paypal',
'description' => __( 'Customize the appearance of Standard Payments on the single product page.', 'woocommerce-paypal-payments' ),
'description' => sprintf(
// translators: %1$s and %2$s are the opening and closing of HTML <a> tag.
__( 'Customize the appearance of the PayPal smart buttons on the %1$sSingle Product Page%2$s.', 'woocommerce-paypal-payments' ),
'<a href="https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-single-product" target="_blank">',
'</a>'
),
),
'button_product_enabled' => array(
'title' => __( 'Enable buttons on Single Product', 'woocommerce-paypal-payments' ),
@ -904,7 +914,7 @@ return array(
),
'options' => array(
'paypal' => __( 'PayPal', 'woocommerce-paypal-payments' ),
'checkout' => __( 'Standard Payments', 'woocommerce-paypal-payments' ),
'checkout' => __( 'Checkout', 'woocommerce-paypal-payments' ),
'buynow' => __( 'PayPal Buy Now', 'woocommerce-paypal-payments' ),
'pay' => __( 'Pay with PayPal', 'woocommerce-paypal-payments' ),
),
@ -964,7 +974,7 @@ return array(
// Cart settings.
'button_cart_heading' => array(
'heading' => __( 'Cart', 'woocommerce-paypal-payments' ),
'heading' => __( 'Cart Buttons', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-heading',
'screens' => array(
State::STATE_START,
@ -972,10 +982,15 @@ return array(
),
'requirements' => array(),
'gateway' => 'paypal',
'description' => __( 'Customize the appearance of Standard Payments on the cart page.', 'woocommerce-paypal-payments' ),
'description' => sprintf(
// translators: %1$s and %2$s are the opening and closing of HTML <a> tag.
__( 'Customize the appearance of the PayPal smart buttons %1$son the Cart page%2$s.', 'woocommerce-paypal-payments' ),
'<a href="https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-cart" target="_blank">',
'</a>'
),
),
'button_cart_enabled' => array(
'title' => __( 'Buttons on Cart', 'woocommerce-paypal-payments' ),
'title' => __( 'Enable buttons on Cart', 'woocommerce-paypal-payments' ),
'type' => 'checkbox',
'label' => __( 'Enable on Cart', 'woocommerce-paypal-payments' ),
'default' => true,
@ -1041,7 +1056,7 @@ return array(
),
'options' => array(
'paypal' => __( 'PayPal', 'woocommerce-paypal-payments' ),
'checkout' => __( 'Standard Payments', 'woocommerce-paypal-payments' ),
'checkout' => __( 'Checkout', 'woocommerce-paypal-payments' ),
'buynow' => __( 'PayPal Buy Now', 'woocommerce-paypal-payments' ),
'pay' => __( 'Pay with PayPal', 'woocommerce-paypal-payments' ),
),
@ -1101,7 +1116,7 @@ return array(
// Mini cart settings.
'button_mini-cart_heading' => array(
'heading' => __( 'Mini Cart', 'woocommerce-paypal-payments' ),
'heading' => __( 'Mini Cart Buttons', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-heading',
'screens' => array(
State::STATE_START,
@ -1109,10 +1124,15 @@ return array(
),
'requirements' => array(),
'gateway' => 'paypal',
'description' => __( 'Customize the appearance of Standard Payments on the Mini Cart.', 'woocommerce-paypal-payments' ),
'description' => sprintf(
// translators: %1$s and %2$s are the opening and closing of HTML <a> tag.
__( 'Customize the appearance of the PayPal smart buttons %1$son the Mini Cart page%2$s.', 'woocommerce-paypal-payments' ),
'<a href="https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-mini-cart" target="_blank">',
'</a>'
),
),
'button_mini-cart_enabled' => array(
'title' => __( 'Buttons on Mini Cart', 'woocommerce-paypal-payments' ),
'title' => __( 'Enable buttons on Mini Cart', 'woocommerce-paypal-payments' ),
'type' => 'checkbox',
'label' => __( 'Enable on Mini Cart', 'woocommerce-paypal-payments' ),
'default' => true,
@ -1178,7 +1198,7 @@ return array(
),
'options' => array(
'paypal' => __( 'PayPal', 'woocommerce-paypal-payments' ),
'checkout' => __( 'Standard Payments', 'woocommerce-paypal-payments' ),
'checkout' => __( 'Checkout', 'woocommerce-paypal-payments' ),
'buynow' => __( 'PayPal Buy Now', 'woocommerce-paypal-payments' ),
'pay' => __( 'Pay with PayPal', 'woocommerce-paypal-payments' ),
),
@ -1701,7 +1721,12 @@ return array(
return false;
},
'wcgateway.settings.tracking-label' => static function ( ContainerInterface $container ): string {
$tracking_label = __( 'Enable tracking information feature on your store.', 'woocommerce-paypal-payments' );
$tracking_label = sprintf(
// translators: %1$s and %2$s are the opening and closing of HTML <a> tag.
__( 'Enable shipment tracking information to be sent to PayPal for seller protection features. Required when %1$sPay upon Invoice%2$s is used.', 'woocommerce-paypal-payments' ),
'<a href="https://woocommerce.com/document/woocommerce-paypal-payments/#pay-upon-invoice-PUI" target="_blank">',
'</a>'
);
$is_tracking_available = $container->get( 'order-tracking.is-tracking-available' );
if ( $is_tracking_available ) {
@ -1790,7 +1815,7 @@ return array(
$pui_button_text = $pui_enabled
? esc_html__( 'Settings', 'woocommerce-paypal-payments' )
: esc_html__( 'Enable Pay Upon Invoice', 'woocommerce-paypal-payments' );
: esc_html__( 'Enable Pay upon Invoice', 'woocommerce-paypal-payments' );
return sprintf(
'<p>%1$s %2$s</p><p><a target="%3$s" href="%4$s" class="button">%5$s</a></p>',