Plugin Support
Laszlo
(@laszloszalvak)
Hi @jduffell
I am sorry, but that can not be achieved with a simple shortcode parameter, as there is no connection between the social buttons and your custom fields.
If your ultimate goal is to store some extra data into an ACF field, when a user registers with social login, then you need to have developer experience, as you will need to write custom PHP codes.
Please note that custom coding is out of the scope of our support, so we won’t be able to provide help in the coding and the debugging process, but I will try to give you some details that might help you in achieving your goals.
So first of all, at the time when you get to the point where we run our registration specific codes a couple of redirects has already happened ( between the provider and your site ), so you will be on an another URL, meaning that you need to store the necessary data temporarily, otherwise you won’t have it in our registration flow. For this you could store the data in a cookie before the user presses the social button, or you could use the trackerdata shortcode parameter with the value you need:
then you could retrieve this value via the getTrackerData() method, within a callback hooked to the “nsl_register_new_user” action:
that we fire when we created a new account. So within this callback function you could run your ACF field updating codes, based on the value that you get from the getTrackerData() method.
In the 1st documentation that I linked above, you can find an example of how you can use getTrackerData() method and the “nsl_register_new_user” action together.
Best regards,
Laszlo.
@laszloszalvak super, thank you for pointing me in the right direction, I’ll give this a go!