From b494d765cfbcc805bd7fce89037627e8d4d91bd8 Mon Sep 17 00:00:00 2001 From: Remy Chauveau Date: Thu, 21 Nov 2024 00:15:50 +0100 Subject: [PATCH] Remove error log --- includes/controllers/Config.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/controllers/Config.php b/includes/controllers/Config.php index 6bad0bb..9d0d4e4 100644 --- a/includes/controllers/Config.php +++ b/includes/controllers/Config.php @@ -144,6 +144,8 @@ private static function GetWalletConfig (){ $xprcheckoutGateway = WC()->payment_gateways->payment_gateways()['xprcheckout']; $rawWallets = $xprcheckoutGateway->get_option('wallets'); + + $defaultWallet = [ 'testnet'=>[ 'store'=>'', @@ -154,9 +156,10 @@ private static function GetWalletConfig (){ 'verified'=>false ], ]; - if (is_null($rawWallets)) return $defaultWallet; + if (empty($rawWallets)) return $defaultWallet; + $unserializedWallet = unserialize($rawWallets); - if (!is_null($unserializedWallet)) return $defaultWallet; + if (is_null($unserializedWallet)) return $defaultWallet; return $unserializedWallet; }