mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
remove reset functionality from Settings container
This commit is contained in:
parent
074a6ea139
commit
e8a3b3d28c
2 changed files with 0 additions and 27 deletions
|
@ -72,17 +72,6 @@ class Settings implements ContainerInterface {
|
|||
update_option( self::KEY, $this->settings );
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the onboarding.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function reset(): bool {
|
||||
$this->load();
|
||||
$this->settings = array();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the settings.
|
||||
|
|
|
@ -133,22 +133,6 @@ class SettingsListener {
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Nonce verification has been done in is_valid_update_request().
|
||||
*
|
||||
* phpcs:disable WordPress.Security.NonceVerification.Missing
|
||||
* phpcs:disable WordPress.Security.NonceVerification.Recommended
|
||||
*/
|
||||
if ( isset( $_POST['save'] ) && sanitize_text_field( wp_unslash( $_POST['save'] ) ) === 'reset' ) {
|
||||
$this->settings->reset();
|
||||
$this->settings->persist();
|
||||
$this->webhook_registrar->unregister();
|
||||
if ( $this->cache->has( PayPalBearer::CACHE_KEY ) ) {
|
||||
$this->cache->delete( PayPalBearer::CACHE_KEY );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitization is done in retrieve_settings_from_raw_data().
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue