• Resolved Mostafa Shahiri

    (@mostafadeveloper)


    Hi

    I want to create a plugin that works with woo-wallet, but I didn’t find a good documentation for it’s functions and classes. I want to know:
    1) how do users wallet charge after online payment?
    2) Also I want to reduce wallet balance after doing some actions like writing.To do this, I don’t know that I have to create a new debit transaction or I have to update latest transaction balance value?
    3) What is the relationship between Woocommerce transaction id in postmeta table and Woo-wallet transactions?

    please guide me

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Subrata Mal

    (@subratamal)

    Hi @mostafadeveloper

    Thanks for reaching out and sorry for the delay in response. For creating a credit or debit transaction in the wallet you can use below code.

    woo_wallet()->wallet->credit($user_id, $amount, $note);
    woo_wallet()->wallet->debit($user_id, $amount, $note);

    We are not using any post meta we have a separate table to record wallet transactions.

    Thank you.

Viewing 1 replies (of 1 total)
  • The topic ‘Some problems with payment and transaction’ is closed to new replies.