From 2a5515369bced2720b15984dc02ee96ec4fdd7a3 Mon Sep 17 00:00:00 2001 From: Halil Beycan <50718965+BeycanDeveloper@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:14:32 +0800 Subject: [PATCH] fixed type error --- classes/DokanCryptoPayWithdrawal.php | 8 ++++++-- cryptopay-withdrawal-for-dokan.php | 4 ++-- readme.txt | 11 +++++++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/classes/DokanCryptoPayWithdrawal.php b/classes/DokanCryptoPayWithdrawal.php index 525f332..3858211 100644 --- a/classes/DokanCryptoPayWithdrawal.php +++ b/classes/DokanCryptoPayWithdrawal.php @@ -163,11 +163,15 @@ private function getNetworksById(): array } /** - * @param array $args + * @param mixed $args * @return void */ - public function userSettingForm(array $args): void + public function userSettingForm(mixed $args): void { + if (!is_array($args)) { + $args = []; + } + $settings = isset($args['payment'][$this->key]) ? $args['payment'][$this->key] : []; $network = isset($settings['network']) ? json_decode($settings['network']) : (object) []; $currency = isset($settings['currency']) ? json_decode($settings['currency']) : (object) []; diff --git a/cryptopay-withdrawal-for-dokan.php b/cryptopay-withdrawal-for-dokan.php index e412939..344f50a 100644 --- a/cryptopay-withdrawal-for-dokan.php +++ b/cryptopay-withdrawal-for-dokan.php @@ -10,7 +10,7 @@ /** * Plugin Name: CryptoPay Withdrawal for Dokan - * Version: 1.0.3 + * Version: 1.0.4 * Plugin URI: https://beycanpress.com/cryptopay/ * Description: Add custom cryptocurrency withdrawal method to Dokan plugin * Author: BeycanPress LLC @@ -20,7 +20,7 @@ * Text Domain: dokan-cryptopay * Tags: Cryptopay, Cryptocurrency, WooCommerce, WordPress, MetaMask, Trust, Binance, Wallet, Ethereum, Bitcoin, Binance smart chain, Payment, Plugin, Gateway, Moralis, Converter, API, coin market cap, CMC * Requires at least: 5.0 - * Tested up to: 6.5.0 + * Tested up to: 6.5.4 * Requires PHP: 8.1 */ diff --git a/readme.txt b/readme.txt index 0ac1e15..4e6dded 100644 --- a/readme.txt +++ b/readme.txt @@ -2,10 +2,10 @@ Contributors: BeycanPress Tags: Bitcoin, Ethereum, Cryptocurrency, Payments, Dokan Requires at least: 5.0 -Tested up to: 6.5.0 +Tested up to: 6.5.4 Requires PHP: 8.1 -Stable Tag: 1.0.3 -Version: 1.0.3 +Stable Tag: 1.0.4 +Version: 1.0.4 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -44,11 +44,14 @@ You can easily translate with Loco translate. == Changelog == += 1.0.4 = +* Fixed: Type error in first installation + = 1.0.2 = * Updated: Compatibility due to updates in CryptoPay 2.1.0 = 1.0.1 = -*Improved: For CryptoPay 2.0.0 +* Improved: For CryptoPay 2.0.0 = 1.0.0 = * Plugin released.