Hi @simon, I have perhaps a similar question…we’re using Woocommerce Memberships and this “WP auto-login to Discourse + redirect back to WP” isn’t working as expected. I thought it might be because I already have some custom redirects set up related to Woocommerce member registration, but actually can’t get it even with those disabled.
I’m currently using:
filter on ‘woocommerce_login_redirect’ - to send people to main dashboard on login
action added with ‘template_redirect’ - to send new members to welcome page immediately after checkout
filter also on ‘woocommerce_registration_redirect’ - to do the same with free (non-purchase) members
However, testing even with all these completely removed from my functions.php, I’m not seeing the expected behavior. When I log in (using the Woocommerce ‘/my-account/’ login url) it doesn’t seem to be redirecting to Discourse and back; if I visit our forum url directly after logged in on WP, I’m not logged in on Discourse.
I think I have all the settings correctly configured including ‘sso allows all return paths = true’…and everything else is working fine with SSO between the sites. If I append ‘/session/sso’ to the Discourse URL it logs me right in. Anything non-obvious I might be overlooking, or possible conflicts you could think of with Woocommerce? I could send you screenshots of my configs if it might help troubleshoot.