August 28, 2018 at 12:31 pm #4200pandglobalParticipant
I want to set a default admin withdrawal address so that once the user request withdrawal the funds will be sent to admin specified static wallet address.
This means I will have a function where I can do the following:
1. Enable or disable withdrawal to external address for all my users except admin.
2. Enable or disable withdrawal to admin default specified wallet address. This means users will not put an address to withdraw to, they only type the amount and hit submit and money is deducted from their wallet to admin wallet.
3. The two options above can be enabled at once too and when that happens the user is presented with a drop down option asking him to withdraw to external wallet or withdraw to admin account.
But if only one option is enabled the drop down will only show that one option while the other option is hidden.August 29, 2018 at 8:52 am #4206
You can already control whether withdrawals are enabled or disabled for a group of users (Role), using the capabilities menu.
As for your other requirement, there is no need to use a blockchain address. Simply do an internal transfer (move). You could override the
[wallets_move]UI to provide a UI that always sends to the admin account, using a hidden input field rather than a visible user field. Please see the documentation on how to override the knockout UIs. If you create your view in
wp-content/plugins/wallets/includes/views/move/toadmin.php, then you can use a shortcode such as
kind regardsApril 14, 2019 at 2:18 am #6179dynamitemediaParticipant
been trying to do a hidden field but i keep getting this error
“Wallet operation failed: Could not move : Required parameter missing: move_toaccount”
so i tried several variations of a hidden field
<input type="hidden" name="__wallets_move_tags" value="move" /> <input type="hidden" name="user" value="Central Bank" />
<input type="hidden" name="__wallets_move_tags" value="move" /> <input type="hidden" name="moveUser" value="Central Bank" />
but nothing is working, keep getting same error
what am i doing wrong?April 15, 2019 at 5:07 am #6188
Knockout does not bind observables to hidden values, even if you try. However from your code it doesn’t look like you’ve even tried to add any bindings.
with regardsApril 15, 2019 at 6:03 pm #6192dynamitemediaParticipant
i was following what you said in that link you left 🙁
and as far as bindings, or wht i left out that is why i asked. I have never came across or used knockout until trying to edit this plugin, its not easy for a novice to work with at allApril 15, 2019 at 6:10 pm #6193
- You must be logged in to reply to this topic.