How to create separate log-in and registration pages in WooCommerce?

I want to separate the user login page from the user registration page in my WooCommerce site. Any guidelines on how can I do that?

Add Comment
2 Answer(s)
Best answer

You can create a copy of the Woocommerce form-login.php and name it form-register.php. The form-login.php is located in /woocommerce/templates/myaccount/ folder.

Then in the form-login.php you can create a link to the form-register.php using this code:

<a href="' .get_permalink(woocommerce_get_page_id('myaccount')). '?action=register"> register </a>
 

Next you need to modify your themes function.php file by adding the following code:

 /*// Separete Login form and registration form */
 add_action('woocommerce_before_customer_login_form','load_registration_form', 2);
 function load_registration_form(){
 if(isset($_GET['action'])=='register'){
 woocommerce_get_template( 'myaccount/form-registration.php' );
 }
 }
 
Geraldine Stevens Answered on November 21, 2015.
Add Comment

This is not working

dazmillion Answered on September 16, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.