Woocommerce's "My Account" page shows a register/login form if the user isn't logged in, but I'm trying to use the default Wordpress login/register page (wp-login.php) instead.
How can I make "/my-account" redirect to "wp-login.php" if the user isn't logged in?
Thank you.
Normally the Woocommerce "customer" user role, can't access to the admin of wordpress. But you can use a function hocked in
woocommerce_before_customer_login_form
hook with a mixed condition to redirect user to classic wordpress login area, this way:Code goes in function.php file of your active child theme (active theme or in any plugin file).
This code is tested and works.