I’ve seen many code snippets online to auto-login the user after completing a form with the User registration add-on. However none of these seem to work after the user returns to the site after payment via Stripe. Is it possible to have the user pay via Stripe, then return to the site (to a ‘thank you’ page) and be auto-logged in?
Would it be possible if I switched to Stripe “Credit Card Field (Elements, SCA-ready)”?
I wonder if it’s then possible because users wont be leaving the site?
I’ve seen code like this online, that claims to login after registration. Is it possible to change the trigger to a ‘payment success’ trigger?
If the payment is collected on the site, then you have a chance at logging the user in after the form is submitted and they are registered. I am not sure if that code still works, but it’s worth a try, if you collect payment on the site (or you can test the code with a non-payment form, to see if it can work.)
If that code does not work, there are other code solutions posted online, or, you can use this perk from Gravity Wiz: