mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-10 23:42:39 +08:00
add setting and manage availability of dcc gateway
This commit is contained in:
parent
f9e64abe14
commit
57a6f8b85c
7 changed files with 22 additions and 10 deletions
|
@ -165,8 +165,8 @@ class SmartButton implements SmartButtonInterface {
|
|||
}
|
||||
|
||||
if (
|
||||
$this->settings->has( 'dcc_gateway_enabled' )
|
||||
&& $this->settings->get( 'dcc_gateway_enabled' )
|
||||
$this->settings->has( 'dcc_enabled' )
|
||||
&& $this->settings->get( 'dcc_enabled' )
|
||||
&& ! $this->session_handler->order()
|
||||
) {
|
||||
add_action(
|
||||
|
@ -772,7 +772,7 @@ class SmartButton implements SmartButtonInterface {
|
|||
return false;
|
||||
}
|
||||
$keys = array(
|
||||
'dcc_gateway_enabled' => 'is_checkout',
|
||||
'dcc_enabled' => 'is_checkout',
|
||||
);
|
||||
foreach ( $keys as $key => $callback ) {
|
||||
if ( $this->settings->has( $key ) && $this->settings->get( $key ) && $callback() ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue