mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
make sure cache_key exists
This commit is contained in:
parent
7fb1e25ad8
commit
004852a2ea
1 changed files with 6 additions and 2 deletions
|
@ -44,7 +44,9 @@ class SettingsListener
|
|||
$this->settings->reset();
|
||||
$this->settings->persist();
|
||||
$this->webhookRegistrar->unregister();
|
||||
$this->cache->delete(PayPalBearer::CACHE_KEY);
|
||||
if ($this->cache->has(PayPalBearer::CACHE_KEY) ) {
|
||||
$this->cache->delete(PayPalBearer::CACHE_KEY);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -60,7 +62,9 @@ class SettingsListener
|
|||
$this->settings->set($id, $value);
|
||||
}
|
||||
$this->settings->persist();
|
||||
$this->cache->delete(PayPalBearer::CACHE_KEY);
|
||||
if ($this->cache->has(PayPalBearer::CACHE_KEY) ) {
|
||||
$this->cache->delete(PayPalBearer::CACHE_KEY);
|
||||
}
|
||||
}
|
||||
|
||||
//phpcs:disable Inpsyde.CodeQuality.NestingLevel.MaxExceeded
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue