diff --git a/modules.local/ppcp-button/src/Assets/SmartButton.php b/modules.local/ppcp-button/src/Assets/SmartButton.php index c324b637c..d9476fd49 100644 --- a/modules.local/ppcp-button/src/Assets/SmartButton.php +++ b/modules.local/ppcp-button/src/Assets/SmartButton.php @@ -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()) { diff --git a/modules.local/ppcp-wc-gateway/services.php b/modules.local/ppcp-wc-gateway/services.php index 7faa01f26..4063ae08b 100644 --- a/modules.local/ppcp-wc-gateway/services.php +++ b/modules.local/ppcp-wc-gateway/services.php @@ -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', diff --git a/modules.local/ppcp-wc-gateway/src/Settings/Settings.php b/modules.local/ppcp-wc-gateway/src/Settings/Settings.php index 0c9442a21..87e99c35f 100644 --- a/modules.local/ppcp-wc-gateway/src/Settings/Settings.php +++ b/modules.local/ppcp-wc-gateway/src/Settings/Settings.php @@ -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'), ];