mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Fix return value
This commit is contained in:
parent
45bef752fd
commit
3ebd3b29bd
1 changed files with 6 additions and 2 deletions
|
@ -395,14 +395,18 @@ class PayPalGateway extends \WC_Payment_Gateway {
|
|||
*
|
||||
* @param string $key The option key.
|
||||
* @param string $value The option value.
|
||||
* @return bool|void
|
||||
* @return bool was anything saved?
|
||||
*/
|
||||
public function update_option( $key, $value = '' ) {
|
||||
parent::update_option( $key, $value );
|
||||
$ret = parent::update_option( $key, $value );
|
||||
|
||||
if ( 'enabled' === $key ) {
|
||||
$this->config->set( 'enabled', 'yes' === $value );
|
||||
$this->config->persist();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue