mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #563 from woocommerce/PCP-594-card-processing-doesnt-appear
Store card processing gateway "enabled" config as a string.
This commit is contained in:
commit
aa9d4c64cb
2 changed files with 5 additions and 2 deletions
|
@ -439,7 +439,7 @@ class CreditCardGateway extends \WC_Payment_Gateway_CC {
|
|||
parent::init_settings();
|
||||
|
||||
// looks like in some cases WC uses this field instead of get_option.
|
||||
$this->enabled = $this->is_enabled();
|
||||
$this->enabled = $this->is_enabled() ? 'yes' : '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -468,7 +468,9 @@ class CreditCardGateway extends \WC_Payment_Gateway_CC {
|
|||
$ret = parent::update_option( $key, $value );
|
||||
|
||||
if ( 'enabled' === $key ) {
|
||||
|
||||
$this->config->set( 'dcc_enabled', 'yes' === $value );
|
||||
$this->config->set( 'enabled', 'yes' === $value );
|
||||
$this->config->persist();
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue