I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

Reply To: Retrieving user from querystring

dashed-slug.net Forums General discussion Retrieving user from querystring Reply To: Retrieving user from querystring

#5590
alexg
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