Want to redirect a user back to the previous page they came from after login?
The Login & Redirect to Previous Page plugin does exactly that.
The Problem
A user may be viewing a product, or a page, or post on your site and realize they want to login. So they click the login link or My Account link on your site and login, at which point they’re still on your login page and must now find their way back to the page they came from. They are not automatically redirected back to where they came from.
There are a few solutions to this issue floating around the Internet that attempt to automatically redirect the user back to the page they came from, but all of the ones we looked at had at least one major flaw: If the user failed to login correctly due to an incorrect username or password, then when they do finally login correctly they are not redirected back to where they came from – the reference to the page they came from is lost.
The Right Solution
Our Login & Redirect to Previous Page extension integrates easily into WooCommerce and consistently tracks which page on your site the user came from when they landed on your site’s My Account page. So no matter how many attempts they make to login, when they finally do login successfully they are correctly redirected back to the page they originally came from.
This extension super easy to use. Just install and activate the plugin and you’re done. There are no settings to adjust, it works automatically.
Compatibility: WooCommerce 2.4 and newer