How To Create Separate Login & Registration Pages In WooCommerce?

By default WooCommerce has only one page showing both login and registration boxes but in a few easy tweaks you can have separate pages for login and registration forms.

Simply create a copy of the WooCommerce form-login.php located in /woocommerce/templates/myaccount/ folder and name it form-register.php.

Now next step is to create a link in form-login.php to the form-register.php, use this code:

<a href=”‘ .get_permalink(woocommerce_get_page_id(‘myaccount’)). ‘?action=register”> register </a>

Last step is to modify your themes function.php file by adding this code:

add_action(‘woocommerce_before_customer_login_form’ , ‘load_registration_form’, 2);

function load_registration_form(){
woocommerce_get_template( ‘myaccount/form-registration.php’ );

That’s all with hacking.

Alternatively, you can also make use of Woocommerce Login / Signup Lite to create a sign up and login process for your ecommerce site with the use of shortcodes.

  1. For login form use – [lsphe-login-form]
  2. For signup form use – [lsphe-signup-form]
  3. For both login and register form use – [lsphe-header]

For headers and templates use this code

<?php echo do_shortcode(‘[lsphe-header]’ ); ?>

This plugin allows you to create:

  1. A Sign Up and Login Pages
  2. A Sign Up and Login Popup
  3. A Page Header that gives you access to both these pages or popups.

2 thoughts on “How To Create Separate Login & Registration Pages In WooCommerce?”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.