mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Revert "Check if DCC is enabled on PayPal account."
This reverts commit 74efffab
This commit is contained in:
parent
74efffab7a
commit
61856d8b85
3 changed files with 13 additions and 5 deletions
|
@ -357,7 +357,7 @@ return function ( ContainerInterface $container, array $fields ): array {
|
|||
'screens' => array(
|
||||
State::STATE_ONBOARDED,
|
||||
),
|
||||
'requirements' => array( 'dcc' ),
|
||||
'requirements' => array(),
|
||||
'gateway' => Settings::CONNECTION_TAB_ID,
|
||||
),
|
||||
'ppcp_pui_status' => array(
|
||||
|
|
|
@ -2144,13 +2144,13 @@ return array(
|
|||
return 'https://www.paypal.com/bizsignup/entry?country.x=DE&product=payment_methods&capabilities=PAY_UPON_INVOICE';
|
||||
},
|
||||
'wcgateway.settings.connection.dcc-status-text' => static function ( ContainerInterface $container ): string {
|
||||
$dcc_product_status = $container->get( 'wcgateway.helper.dcc-product-status' );
|
||||
assert( $dcc_product_status instanceof DCCProductStatus );
|
||||
$dcc_applies = $container->get( 'api.helpers.dccapplies' );
|
||||
assert( $dcc_applies instanceof DccApplies );
|
||||
|
||||
$environment = $container->get( 'onboarding.environment' );
|
||||
assert( $environment instanceof Environment );
|
||||
|
||||
$dcc_enabled = $dcc_product_status->dcc_is_active();
|
||||
$dcc_enabled = $dcc_applies->for_country_currency() || $dcc_applies->for_wc_payments();
|
||||
|
||||
$enabled_status_text = esc_html__( 'Status: Enabled', 'woocommerce-paypal-payments' );
|
||||
$disabled_status_text = esc_html__( 'Status: Not yet enabled', 'woocommerce-paypal-payments' );
|
||||
|
@ -2183,7 +2183,9 @@ return array(
|
|||
$environment = $container->get( 'onboarding.environment' );
|
||||
assert( $environment instanceof Environment );
|
||||
|
||||
$pui_enabled = $pui_product_status->pui_is_active();
|
||||
$shop_country = $container->get( 'api.shop.country' );
|
||||
|
||||
$pui_enabled = 'DE' === $shop_country && $pui_product_status->pui_is_active();
|
||||
|
||||
$enabled_status_text = esc_html__( 'Status: Enabled', 'woocommerce-paypal-payments' );
|
||||
$disabled_status_text = esc_html__( 'Status: Not yet enabled', 'woocommerce-paypal-payments' );
|
||||
|
|
|
@ -390,6 +390,12 @@ $data_rows_html
|
|||
) {
|
||||
continue;
|
||||
}
|
||||
if (
|
||||
in_array( 'dcc', $config['requirements'], true )
|
||||
&& ! $this->dcc_product_status->dcc_is_active()
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
if (
|
||||
in_array( 'messages', $config['requirements'], true )
|
||||
&& ! $this->messages_apply->for_country()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue