This snippet ensures that when users log in with Nextend Social Login (or any other login method) and get redirected to the custom login page (/user-login), they are immediately forwarded to the WooCommerce My Account page (/my-account) or your own custom account page.
It prevents logged-in users from unnecessarily staying on the login page.
Install and activate the Code Snippets plugin (or paste into your theme’s functions.php).
Add a new snippet and paste the code below.
Save and activate.
After login, any user who lands on /user-login while already logged in will be automatically redirected to /my-account.