We were wondering if it’s possible to tie in some custom functionality we have with the wallet system.
When the user clicks “Buy now”, we’d like to debit £5 from the user’s wallet.
This works fine using woo_wallet()->wallet->debit($user_id, 1, ‘Product Highlight for ‘.$product_id.”);
However, we don’t get any errors if the user has no balance. Is there a way to get an error response?