Skip to content

Commit

Permalink
Fixed: Type error in first installation
Browse files Browse the repository at this point in the history
  • Loading branch information
BeycanDeveloper committed Jul 5, 2024
1 parent 2a55153 commit ea44d47
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
7 changes: 4 additions & 3 deletions classes/DokanCryptoPayWithdrawal.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -266,11 +266,12 @@ public function saveSettings(array $dokanSettings, string $storeId): array

/**
* @param array<string> $activePaymentMethods
* @param int $vendorId
* @return array<string>
*/
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'])) {
Expand Down
4 changes: 2 additions & 2 deletions cryptopay-withdrawal-for-dokan.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
*/

Expand Down
9 changes: 6 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit ea44d47

Please sign in to comment.