The WooCommerce My Account login form redirects to… itself once a WordPress user logs in. So, what if you want to redirect logged in users to another page or a different My Account endpoint?
Also, when you have a custom Login page, you may need to redirect users to the… My Account page!
Either way, here’s how to change the default redirect behavior. Enjoy!
PHP Snippet: Redirect Logins to Custom URL @ My Account Page
This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101
Related content
WooCommerce: Custom Add to Cart URLs – The Ultimate Guide In WooCommerce you can add a product to the cart via a custom link. You just need to use the “add-to-cart” URL parameter followed by the product ID. This tutorial will show you how to create custom URLs to add simple, variable and grouped products to the cart – as well as defining the add […]
WooCommerce: Add New Tab @ My Account Page One of the features of Business Bloomer Club is the provision of Premium WooCommerce Q&A Support to supporters who enroll. So, how to add an extra “tab” to the My Account page, and how to add content inside it? Here’s the code I used (thanks to Mike Jolley for inspiration) – feel free to leave […]
WooCommerce: Separate Login, Registration, My Account Pages There are times when you need to send logged out customers to a Login page and unregistered customers to a standalone Register page. As you know, the WooCommerce My Account page, which contains the Login Username or email address * Password * Remember me Log in Lost your password? shortcode, has both Login and Registration forms when […]
WooCommerce: How To Make A Website GDPR Compliant? (12 Steps) Ok, we all know that the EU General Data Protection Regulation (GDPR) will come into force on the 25th May 2018. So the main question is: what changes do we need to make on our WooCommerce website to become compliant? And another important query might be: how does GDPR affect non-European WooCommerce websites? In this […]
WooCommerce: Add First & Last Name to My Account Register Form Here’s yet another useful PHP snippet – and a mini-plugin alternative with super simple settings – that adds the Billing First Name and Billing Last Name to the Registration Form on the WooCommerce My Account page. By default, the WooCommerce customer Registration Form only displays the email, username, and password fields (unless username and password […]
Rodolfo Melogli
Business Bloomer Founder
Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli
6 thoughts on “WooCommerce: Custom Login Redirect @ My Account”
Hello, i have a problem that yo maybe able to fix, i have a custom log in page, but when people go to mysite.com/account page set it with the woocommerce_account shortcode, and they are logout redirect to the woocommerce log in not the custom one that i create. i want that people alway sign in in my custome pages and custom form.
Hello Danilo, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!
Questions? Feedback? Customization? Leave your comment now! _____
If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!
Hello, i have a problem that yo maybe able to fix, i have a custom log in page, but when people go to mysite.com/account page set it with the woocommerce_account shortcode, and they are logout redirect to the woocommerce log in not the custom one that i create. i want that people alway sign in in my custome pages and custom form.
Hello Danilo, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!
It worked, many thanks!
Great!
No, it is not working.
Thanks for your feedback. Please temporarily disable all plugins except WooCommerce and try again. Let me know