I had purchased woo wallet withdrawal plugin

tyronx75

Member
Sep 21, 2019
51
35
18
Hi all,

first of all , i would like to thank you to Tomz for providing this best site and to all members your guy's are awesome..

i have purchased this woo wallet withdrawal (Tera Wallet) , its really best if , someone could check whether this plugin need to be nulled or not.

i have 1 request , can someone modified this plugin

Where , currently

example Total balance wallet : 200usd
payment gateway charges : 5%

so when user request withdrawal its should be 200usd - 5% = so user will get only 196usd... but currently when user request all withdrawal of 200usd the plugin remark not enough balance as 200usd was + 5% (4usd) so total will be 204usd instead of 200 total balance..

can someone help to modify this plugin so its will be total balance - payment gateway charges and user will only get the balance after deducted from payment gateway charges.

thank you
 

Attachments

  • woo-wallet-withdrawal.zip
    277.4 KB · Views: 71
Last edited:

Saint Gabriel

Well-known member
Jan 3, 2020
2,998
3,049
113
I think you should install a Plugin for doing that. Woocommerce Payment Gateway Fees instead of modifying it.

Booster plus can do it. Then you assign the percentage to the Wallet.
 

MrSam_1

Well-known member
Administrative
Trusted Seller
Dec 1, 2018
24,049
27,335
120
@RonanTheAccuser he is right. This plugin have a code flaw
While the gateway process correctly the withdrawal (subtract fee from withdrawal amount)
$this->withdrawal_amount = get_post_meta($withdrawal->ID, '_wallet_withdrawal_amount', true) - get_post_meta($withdrawal->ID, '_wallet_withdrawal_transaction_charge', true);

frontend manager is flawed (add transaction charge to withdrawal amount)

$withdrawal_transaction_id = woo_wallet()->wallet->debit(get_current_user_id(), ($wallet_withdrawal_amount + $transaction_charge)

So correct would be to show and check the withdrawal amount while processing it subtracting the fee

class-woo-wallet-withdrawal-frontend.php would change like this:

Code:
# find following line in "private function validate_withdrawal_request()"
if ($wallet_withdrawal_amount + $transaction_charge > woo_wallet()->wallet->get_wallet_balance(get_current_user_id(), 'edit'))
# and change it with
if ($wallet_withdrawal_amount > woo_wallet()->wallet->get_wallet_balance(get_current_user_id(), 'edit'))

# also find following line in "private function process_withdrawal($withdrawal_id)"
$withdrawal_transaction_id = woo_wallet()->wallet->debit(get_current_user_id(), ($wallet_withdrawal_amount + $transaction_charge), __('Wallet withdrawal request #', 'woo-wallet-withdrawal') . $withdrawal_id);
# and replace it with
$withdrawal_transaction_id = woo_wallet()->wallet->debit(get_current_user_id(), ($wallet_withdrawal_amount), __('Wallet withdrawal request #', 'woo-wallet-withdrawal') . $withdrawal_id);

This should fix your problem @tyronx75

Also this plugin needs to be nulled but I don't have time to take care of it right now.
 

tyronx75

Member
Sep 21, 2019
51
35
18
@RonanTheAccuser he is right. This plugin have a code flaw
While the gateway process correctly the withdrawal (subtract fee from withdrawal amount)
$this->withdrawal_amount = get_post_meta($withdrawal->ID, '_wallet_withdrawal_amount', true) - get_post_meta($withdrawal->ID, '_wallet_withdrawal_transaction_charge', true);

frontend manager is flawed (add transaction charge to withdrawal amount)

$withdrawal_transaction_id = woo_wallet()->wallet->debit(get_current_user_id(), ($wallet_withdrawal_amount + $transaction_charge)

So correct would be to show and check the withdrawal amount while processing it subtracting the fee

class-woo-wallet-withdrawal-frontend.php would change like this:

Code:
# find following line in "private function validate_withdrawal_request()"
if ($wallet_withdrawal_amount + $transaction_charge > woo_wallet()->wallet->get_wallet_balance(get_current_user_id(), 'edit'))
# and change it with
if ($wallet_withdrawal_amount > woo_wallet()->wallet->get_wallet_balance(get_current_user_id(), 'edit'))

# also find following line in "private function process_withdrawal($withdrawal_id)"
$withdrawal_transaction_id = woo_wallet()->wallet->debit(get_current_user_id(), ($wallet_withdrawal_amount + $transaction_charge), __('Wallet withdrawal request #', 'woo-wallet-withdrawal') . $withdrawal_id);
# and replace it with
$withdrawal_transaction_id = woo_wallet()->wallet->debit(get_current_user_id(), ($wallet_withdrawal_amount), __('Wallet withdrawal request #', 'woo-wallet-withdrawal') . $withdrawal_id);

This should fix your problem @tyronx75

Also this plugin needs to be nulled but I don't have time to take care of it right now.
Thank you so much sir, i had try installing it. And its not asking for any key to activates it hope the key is not compulsory to run with terrawallet
 
  • Like
Reactions: tanierlyons
Mar 7, 2020
77
37
18
hey @tyronx75 since you are using terrawallet, did you use the topup feature ? if yes, have you modified their checkout page to specific checkout page ( not global checkout page ) that build use other plugin like cartflows pro or aerocheckout ? .
 

Forum statistics

Threads
69,462
Messages
909,793
Members
239,558
Latest member
CR3D

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu