diff --git a/classes/DokanCryptoPayWithdrawal.php b/classes/DokanCryptoPayWithdrawal.php index 3858211..ba9cdfb 100644 --- a/classes/DokanCryptoPayWithdrawal.php +++ b/classes/DokanCryptoPayWithdrawal.php @@ -53,8 +53,8 @@ public function __construct(string $title, string $key) add_filter('dokan_withdraw_methods', [$this, 'addWithdrawMethod']); add_filter('dokan_withdraw_method_icon', [$this, 'addMethodIcon'], 10, 2); add_filter('dokan_store_profile_settings_args', [$this, 'saveSettings'], 10, 2); - add_filter('dokan_get_seller_active_withdraw_methods', [$this, 'activePaymentMethods']); add_filter('dokan_withdraw_withdrawable_payment_methods', [$this, 'withdrawPaymentMethods']); + add_filter('dokan_get_seller_active_withdraw_methods', [$this, 'activePaymentMethods'], 10, 2); add_filter('dokan_payment_settings_required_fields', [$this, 'addWithdrawInPaymentMethodList'], 10, 2); add_filter('dokan_withdraw_method_additional_info', [$this, 'addWithdrawMethodAdditionalInfo'], 10, 2); @@ -266,11 +266,12 @@ public function saveSettings(array $dokanSettings, string $storeId): array /** * @param array $activePaymentMethods + * @param int $vendorId * @return array */ - public function activePaymentMethods(array $activePaymentMethods): array + public function activePaymentMethods(array $activePaymentMethods, int $vendorId): array { - $settings = get_user_meta(dokan_get_current_user_id(), 'dokan_profile_settings'); + $settings = get_user_meta($vendorId ? $vendorId : dokan_get_current_user_id(), 'dokan_profile_settings'); $settings = isset($settings[0]['payment'][$this->key]) ? $settings[0]['payment'][$this->key] : []; if (isset($settings['address']) && !empty($settings['address'])) { diff --git a/cryptopay-withdrawal-for-dokan.php b/cryptopay-withdrawal-for-dokan.php index 344f50a..12315f8 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.4 + * Version: 1.0.5 * 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.4 + * Tested up to: 6.5.5 * Requires PHP: 8.1 */ diff --git a/readme.txt b/readme.txt index 4e6dded..c68ff9e 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.4 +Tested up to: 6.5.5 Requires PHP: 8.1 -Stable Tag: 1.0.4 -Version: 1.0.4 +Stable Tag: 1.0.5 +Version: 1.0.5 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -44,6 +44,9 @@ You can easily translate with Loco translate. == Changelog == += 1.0.5 = +* Fixed: Withdrawal action process + = 1.0.4 = * Fixed: Type error in first installation