malsubrata / woo-wallet

WooCommerce Wallet
GNU General Public License v3.0
78 stars 37 forks source link

I want to make customer place order with negative balance #76

Open YoussufAbramo opened 1 year ago

YoussufAbramo commented 1 year ago

I want customers have the ability to place orders using Tera Wallet even if they have no sufficient balance in their wallets. The available balance should be deduced to 0 and the remaining balance is negatively minus from the balance.

Example: if the customer has 100$ and the product’s price is 150$. The new balance after his order should be -50$.

and this negative balance should be shown in his wallet in his account.

I have revised this article: https://wordpress.org/support/topic/unable-to-pay-with-negative-wallet-balance-after-recent-update/

and I used the code mentioned inside it: add_filter('woo_wallet_disallow_negative_transaction', '__return_false', 1); add_filter('woo_wallet_payment_is_available', '__return_true');

and it worked for me as same as I expect. he can order with insufficient balance and the order is recorded in Woocommerce, but the only problem is that the negative balance is not reflected in his wallet balance.

can somebody help, please?