diff --git a/modules/ppcp-api-client/src/Helper/DccApplies.php b/modules/ppcp-api-client/src/Helper/DccApplies.php
index 6d694536c..b13399423 100644
--- a/modules/ppcp-api-client/src/Helper/DccApplies.php
+++ b/modules/ppcp-api-client/src/Helper/DccApplies.php
@@ -77,6 +77,18 @@ class DccApplies {
return $applies;
}
+ /**
+ * Returns whether WooCommerce Payments plugin is available for the store country.
+ *
+ * @return bool
+ */
+ public function for_wc_payments(): bool {
+ $countries = array_keys( $this->allowed_country_currency_matrix );
+ array_push( $countries, 'AT', 'BE', 'HK', 'IE', 'NL', 'PL', 'PT', 'SG', 'CH' );
+
+ return in_array( $this->country, $countries, true );
+ }
+
/**
* Returns credit cards, which can be used.
*
diff --git a/modules/ppcp-onboarding/assets/css/onboarding.css b/modules/ppcp-onboarding/assets/css/onboarding.css
index eafbe718a..9441ac5fa 100644
--- a/modules/ppcp-onboarding/assets/css/onboarding.css
+++ b/modules/ppcp-onboarding/assets/css/onboarding.css
@@ -55,6 +55,7 @@ ul.ppcp-onboarding-options, ul.ppcp-onboarding-options-sublist {
ul.ppcp-onboarding-options-sublist {
margin-left: 15px;
+ margin-top: 15px;
}
.ppcp-muted-text {
diff --git a/modules/ppcp-onboarding/assets/js/onboarding.js b/modules/ppcp-onboarding/assets/js/onboarding.js
index 5671938e4..64eb9375e 100644
--- a/modules/ppcp-onboarding/assets/js/onboarding.js
+++ b/modules/ppcp-onboarding/assets/js/onboarding.js
@@ -158,6 +158,8 @@ function ppcp_onboarding_productionCallback(...args) {
input.disabled = !cardsChk.checked;
});
+ document.querySelector('.ppcp-onboarding-cards-options').style.display = !cardsChk.checked ? 'none' : '';
+
const basicRb = document.querySelector('#ppcp-onboarding-dcc-basic');
const isExpress = !cardsChk.checked || basicRb.checked;
diff --git a/modules/ppcp-onboarding/src/Render/OnboardingOptionsRenderer.php b/modules/ppcp-onboarding/src/Render/OnboardingOptionsRenderer.php
index c760b2f2c..3720fe6a6 100644
--- a/modules/ppcp-onboarding/src/Render/OnboardingOptionsRenderer.php
+++ b/modules/ppcp-onboarding/src/Render/OnboardingOptionsRenderer.php
@@ -56,6 +56,7 @@ class OnboardingOptionsRenderer {
* @param bool $is_shop_supports_dcc Whether the shop can use DCC (country, currency).
*/
public function render( bool $is_shop_supports_dcc ): string {
+ $checked = $is_shop_supports_dcc ? '' : 'checked';
return '
@@ -64,9 +65,7 @@ class OnboardingOptionsRenderer {
- ' .
- __( 'Securely accept all major credit & debit cards on the strength of the PayPal network', 'woocommerce-paypal-payments' ) . '
-
+ ' . __( 'Securely accept all major credit & debit cards on the strength of the PayPal network', 'woocommerce-paypal-payments' ) . '
' . $this->render_dcc( $is_shop_supports_dcc ) . ' ' .
$this->render_pui_option()
@@ -103,6 +102,44 @@ class OnboardingOptionsRenderer {
$is_us_shop = 'US' === $this->country;
+ $basic_table_rows = array(
+ $this->render_table_row(
+ __( 'Credit & Debit Card form fields', 'woocommerce-paypal-payments' ),
+ __( 'Prebuilt user experience', 'woocommerce-paypal-payments' )
+ ),
+ ! $is_us_shop ? '' : $this->render_table_row(
+ __( 'Credit & Debit Card pricing', 'woocommerce-paypal-payments' ),
+ __( '3.49% + $0.49', 'woocommerce-paypal-payments' ),
+ '',
+ __( 'for US domestic transactions', 'woocommerce-paypal-payments' )
+ ),
+ $this->render_table_row(
+ __( 'Seller Protection', 'woocommerce-paypal-payments' ),
+ __( 'Yes', 'woocommerce-paypal-payments' ),
+ __( 'No matter what you sell, Seller Protection can help you avoid chargebacks, reversals, and fees on eligible PayPal payment transactions — even when a customer has filed a dispute.', 'woocommerce-paypal-payments' ),
+ __( 'for eligible PayPal transactions', 'woocommerce-paypal-payments' )
+ ),
+ $this->render_table_row(
+ __( 'Seller Account Type', 'woocommerce-paypal-payments' ),
+ __( 'Business or Casual', 'woocommerce-paypal-payments' ),
+ __( 'For Standard payments, Casual sellers may connect their Personal PayPal account in eligible countries to sell on WooCommerce. For Advanced payments, a Business PayPal account is required.', 'woocommerce-paypal-payments' )
+ ),
+ );
+ $items[] = '
+
+
+ ' .
+ __( 'Standard Card Processing', 'woocommerce-paypal-payments' ) . '
+
+ ' . $this->render_tooltip( __( 'Card transactions are managed by PayPal, which simplifies compliance requirements for you.', 'woocommerce-paypal-payments' ) ) . '
+
+ ' . implode( $basic_table_rows ) . '
+
+ ';
+
if ( $is_shop_supports_dcc ) {
$dcc_table_rows = array(
$this->render_table_row(
@@ -146,9 +183,9 @@ class OnboardingOptionsRenderer {
$items[] = '
- get_screen_url( 'acdc' ) . '"> ' .
- __( 'Advanced Card Processing', 'woocommerce-paypal-payments' ) . '
+ __( 'Advanced Card Processing', 'woocommerce-paypal-payments' ) . '
' . $this->render_tooltip( __( 'PayPal acts as the payment processor for card transactions. You can add optional features like Chargeback Protection for more security.', 'woocommerce-paypal-payments' ) ) . '
@@ -157,53 +194,13 @@ class OnboardingOptionsRenderer {
';
}
- $basic_table_rows = array(
- $this->render_table_row(
- __( 'Credit & Debit Card form fields', 'woocommerce-paypal-payments' ),
- __( 'Prebuilt user experience', 'woocommerce-paypal-payments' )
- ),
- ! $is_us_shop ? '' : $this->render_table_row(
- __( 'Credit & Debit Card pricing', 'woocommerce-paypal-payments' ),
- __( '3.49% + $0.49', 'woocommerce-paypal-payments' ),
- '',
- __( 'for US domestic transactions', 'woocommerce-paypal-payments' )
- ),
- $this->render_table_row(
- __( 'Seller Protection', 'woocommerce-paypal-payments' ),
- __( 'Yes', 'woocommerce-paypal-payments' ),
- __( 'No matter what you sell, Seller Protection can help you avoid chargebacks, reversals, and fees on eligible PayPal payment transactions — even when a customer has filed a dispute.', 'woocommerce-paypal-payments' ),
- __( 'for eligible PayPal transactions', 'woocommerce-paypal-payments' )
- ),
- $this->render_table_row(
- __( 'Seller Account Type', 'woocommerce-paypal-payments' ),
- __( 'Business or Casual', 'woocommerce-paypal-payments' ),
- __( 'For Standard payments, Casual sellers may connect their Personal PayPal account in eligible countries to sell on WooCommerce. For Advanced payments, a Business PayPal account is required.', 'woocommerce-paypal-payments' )
- ),
- );
- $items[] = '
-
-
- ' .
- __( 'Standard Card Processing', 'woocommerce-paypal-payments' ) . '
-
- ' . $this->render_tooltip( __( 'Card transactions are managed by PayPal, which simplifies compliance requirements for you.', 'woocommerce-paypal-payments' ) ) . '
-
- ' . implode( $basic_table_rows ) . '
-
- ';
-
return '
' .
implode( '', $items ) .
'
-
' .
- ( $is_shop_supports_dcc ? '
' : '' ) . '
-
+
';
}
diff --git a/modules/ppcp-wc-gateway/services.php b/modules/ppcp-wc-gateway/services.php
index c3ea342ac..87c4ce2b4 100644
--- a/modules/ppcp-wc-gateway/services.php
+++ b/modules/ppcp-wc-gateway/services.php
@@ -358,7 +358,7 @@ return array(
$dcc_applies = $container->get( 'api.helpers.dccapplies' );
assert( $dcc_applies instanceof DccApplies );
- $is_shop_supports_dcc = $dcc_applies->for_country_currency();
+ $is_shop_supports_dcc = $dcc_applies->for_country_currency() || $dcc_applies->for_wc_payments();
$onboarding_options_renderer = $container->get( 'onboarding.render-options' );
assert( $onboarding_options_renderer instanceof OnboardingOptionsRenderer );