mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
when performing a reset, delete all existing settings
This commit is contained in:
parent
c647dbdb4e
commit
85061fa785
1 changed files with 1 additions and 11 deletions
|
@ -79,17 +79,7 @@ class Settings implements ContainerInterface {
|
|||
*/
|
||||
public function reset(): bool {
|
||||
$this->load();
|
||||
$fields_to_reset = array(
|
||||
'enabled',
|
||||
'dcc_enabled',
|
||||
'intent',
|
||||
'client_id',
|
||||
'client_secret',
|
||||
'merchant_email',
|
||||
);
|
||||
foreach ( $fields_to_reset as $id ) {
|
||||
$this->settings[ $id ] = null;
|
||||
}
|
||||
$this->settings = [];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue