I am designing a website with woo commerce wordpress I have separate the login and register page by reference to this solution
How can I redirect the registration page to login page after successful registration without logged in. The user need to login there with the emailed username and password.
my login page is
www.example.com/my-account/
and registration page is
www.example.com/my-account/?action=register
You can use the
woocommerce
filter to prevent authentication.Add this snippet to you functions.php file in child theme:
Below line of code is located at
woocommerce/includes/class-wc-form-handler.php
line no 905.wp_redirect( apply_filters( 'woocommerce_registration_redirect', $redirect ) );
I correcting answer given by @user3518270
Below line will not work as it is filter used by woocommerce So need to use add_filter() instead of add_action()
You can do this using cookie,
function.php
page-my-account.php
After a lot of search I found the solution for this
Step1: add WP Approve User
Step2: add these code to ur theme function file