Yes, you can call the debit method via an ajax request for example.
class Woo_Wallet_Wallet
global $woo_wallet;
$woo_wallet->debit($user_id, amount, 'Description here');
Or maybe it was $woo_wallet->wallet->debit … I forget.
Also useful.
get_wallet_balance($user_id) You can leave user_id blank to get for the logged in user.
See
https://github.com/malsubrata/woo-wallet/blob/master/includes/class-woo-wallet-wallet.php
There is a filter in recode_transaction for woo_wallet_disallow_negative_transaction to say if going negative balance is okay or not.
Hi, @leaders03 Thanks for reaching out and @liammitchell thanks for your response. Yes @liammitchell you are right you can decrease user wallet balance using woo_wallet()->wallet->debit($user_id, $amount, $description); function.
How will I check if the user wallet balance is greater than 0.