dashed-slug.net › Forums › General discussion › Use of the plugin’s front end without the need for JavaScript › Reply To: Use of the plugin’s front end without the need for JavaScript
Hello,
You can use the functions in helpers/balances.php to get the balances.
PHPdocumentor page:
https://wallets-phpdoc.dashed-slug.net/wallets/files/build-helpers-balances.html
Note that these functions are all under the DSWallets
namespace. So you either need to be in that namespace, or prefix the functions with the namespace. e.g. $balances = DSWallets\get_all_balances_assoc_for_user( $user_id );
You can see this particular function in action at the plugin’s user profile page code:
https://github.com/dashed-slug/wallets/blob/6.2.4/admin/profile.php#L97-L216
To be clear, this is the code that displays user balances in the user profile admin screen.
Note the difference between balances and available_balances. The links point to the glossary.
Please let me know if you have any more questions about anything.
with regards