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:
Emili Castells 2022-04-13 10:27:25 +02:00 committed by GitHub
commit aa9d4c64cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -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;