when performing a reset, delete all existing settings

This commit is contained in:
David Remer 2020-09-03 08:10:29 +03:00
parent c647dbdb4e
commit 85061fa785

View file

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