mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
remove extra checkout enable checkbox for dcc
This commit is contained in:
parent
0bc0d66456
commit
47e5d96f4f
3 changed files with 3 additions and 20 deletions
|
@ -74,8 +74,8 @@ class SmartButton implements SmartButtonInterface
|
|||
$this->renderMessageWrapperRegistrar();
|
||||
|
||||
if (
|
||||
$this->settings->has('dcc_checkout_enabled')
|
||||
&& $this->settings->get('dcc_checkout_enabled')
|
||||
$this->settings->has('dcc_gateway_enabled')
|
||||
&& $this->settings->get('dcc_gateway_enabled')
|
||||
&& ! $this->sessionHandler->order()
|
||||
) {
|
||||
add_action(
|
||||
|
@ -603,10 +603,7 @@ class SmartButton implements SmartButtonInterface
|
|||
return false;
|
||||
}
|
||||
$keys = [
|
||||
'dcc_cart_enabled' => 'is_cart',
|
||||
'dcc_mini_cart_enabled' => '__return_true',
|
||||
'dcc_checkout_enabled' => 'is_checkout',
|
||||
'dcc_single_product_enabled' => 'is_product',
|
||||
'dcc_gateway_enabled' => 'is_checkout',
|
||||
];
|
||||
foreach ($keys as $key => $callback) {
|
||||
if ($this->settings->has($key) && $this->settings->get($key) && $callback()) {
|
||||
|
|
|
@ -1436,19 +1436,6 @@ return [
|
|||
'gateway' => 'paypal',
|
||||
],
|
||||
|
||||
'dcc_checkout_enabled' => [
|
||||
'title' => __('Enable credit card on checkout', 'woocommerce-paypal-commerce-gateway'),
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Allow your customers to pay with credit card in the checkout.', 'woocommerce-paypal-commerce-gateway'),
|
||||
'default' => true,
|
||||
'screens' => [
|
||||
State::STATE_ONBOARDED,
|
||||
],
|
||||
'requirements' => [
|
||||
'dcc',
|
||||
],
|
||||
'gateway' => 'dcc',
|
||||
],
|
||||
'disable_cards' => [
|
||||
'title' => __('Disable specific credit cards', 'woocommerce-paypal-commerce-gateway'),
|
||||
'type' => 'ppcp-multiselect',
|
||||
|
|
|
@ -82,7 +82,6 @@ class Settings implements ContainerInterface
|
|||
'button_cart_enabled' => true,
|
||||
'dcc_cart_enabled' => true,
|
||||
'dcc_mini_cart_enabled' => true,
|
||||
'dcc_checkout_enabled' => true,
|
||||
'dcc_single_product_enabled' => true,
|
||||
'brand_name' => get_bloginfo('name'),
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue