If the user tries to access a page that’s restricted to them, you can redirect them to a log-in or password form page. You can also redirect them back to the original page they tried to access after they successfully log in.
To redirect users back to their original page after logging:
- Go to WooCommerce > Settings > Members Only
- Select ‘Redirect’ in the ‘After Logging in’ option
- Choose ‘Referring page’ in the ‘After Log In, Redirect To’ field