WooCommerce: Separate Login and Registration Pages

There are times when you need to send logged out customers to a Login page and unregistered customers to a distinct Register page.

As you know, the WooCommerce My Account page, which contains the [woocommerce_my_account] shortcode, has both Login and Registration forms. But this is not always a good idea, mostly when you use landing pages or sales pages with a specific goal e.g. user registration.

Clearly, when this happens, you don’t want to have a login form there as well. My solution provides two new shortcodes, one for the login form and one for the register form.

Please be aware both shortcodes’ content is copied from WooCommerce template files – if WooCommerce releases an update or makes a change to these files, you need to change the shortcode coding too.

Give it a go, feedback is much appreciated ?

New shortcodes to display WooCommerce Login and Registration forms separately

What to do before using the shortcodes below…

As you know, the [woocommerce_my_account] shortcode is a very important one and must be kept on the WooCommerce My Account page at all costs.

This means, if you want to keep the login form AND the “My Account” dashboard while logged in on the same page, just keep using [woocommerce_my_account] for that, together with Snippet #1.

To recap, if you want to have LOGIN + MY ACCOUNT, and a separate REGISTRATION page, use these 2 shortcodes and Snippet #1:

  • [wc_reg_form_bbloomer] on the Register Page
  • [woocommerce_my_account] on the Login / My Account Page

If you want to have separate LOGIN, REGISTRATION and MY ACCOUNT pages then you need 3 shortcodes, Snippet #1 and Snippet #2:

  • [wc_reg_form_bbloomer] on the Register Page
  • [wc_login_form_bbloomer] on the Login Page
  • [woocommerce_my_account ] on the My Account Page

In both cases, you need to disable “Allow customers to create an account on the “My account” page”:

Either way, you need to disable registrations from the “My Account” page

Snippet #1 (PHP): Separate WooCommerce Customer Registration (Shortcode)

Snippet #2 (PHP): Separate WooCommerce Login (Shortcode)

Please read the notes above – you might not need this shortcode at all and [woocommerce_my_account] may be sufficient to show the login form.