mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Do not redirect when handling vault_enabled
settings, also return false if there is no scope yet
This commit is contained in:
parent
61397bc798
commit
1725d2da18
3 changed files with 65 additions and 6 deletions
|
@ -104,7 +104,11 @@ class Token {
|
|||
*
|
||||
* @return bool Whether vaulting features are enabled or not.
|
||||
*/
|
||||
public function vaulting_available() {
|
||||
public function vaulting_available(): bool {
|
||||
if ( ! isset( $this->json->scope ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( strpos(
|
||||
$this->json->scope,
|
||||
'https://uri.paypal.com/services/vault/payment-tokens/readwrite'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue