dashed-slug.net › Forums › General discussion › Retrieving user from querystring › Reply To: Retrieving user from querystring
January 21, 2019 at 10:00 am
#5590
Keymaster
Hello,
First of all, it looks like what you are trying to accomplish is some type of tipping feature. So, if you haven’t already, see if the Tip the Author extension can perform the function you want.
If you want to do exactly what you described, you will need to add some JavaScript to your page.
You would need to attach your code to the wallets_ready
event:
$( 'html' ).on( 'wallets_ready', function( event, coins, nonces ) {
// TODO add your code here
} );
Inside this, you can read your GET parameter.
Once you have your user name in a variable, you can add it to the wallets_move
form like so:
if ( userName ) {
wp.wallets.viewModels.wallets.moveUser( userName );
}
Please let me know if you have any more questions about this.
with regards