From a53e4d4187afee044e3812f5ce574c42a79fec5d Mon Sep 17 00:00:00 2001 From: David Remer Date: Sat, 1 Aug 2020 13:16:05 +0300 Subject: [PATCH] check if saved token data has id before creating Token --- .../ppcp-subscription/src/Repository/PaymentTokenRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules.local/ppcp-subscription/src/Repository/PaymentTokenRepository.php b/modules.local/ppcp-subscription/src/Repository/PaymentTokenRepository.php index 33840c06c..b48738e50 100644 --- a/modules.local/ppcp-subscription/src/Repository/PaymentTokenRepository.php +++ b/modules.local/ppcp-subscription/src/Repository/PaymentTokenRepository.php @@ -28,7 +28,7 @@ class PaymentTokenRepository { try { $token = (array) get_user_meta($id, self::USER_META, true); - if (! $token) { + if (! $token || ! isset($token['id'])) { return $this->fetchForUserId($id); }