WooCommerce: Remove or Move User Login / Registration at Checkout

Whether you want to disable login / registration on the WooCommerce Checkout page or move the login form from the top to the bottom of it, this is a simple thing to do. You can do it via a PHP snippet or WooCommerce settings.

Solution 1: Remove Login/Registration @ Checkout Page

Just untick/uncheck the fields in red.

WooCommerce settings: remove login/registration at checkout page

Solution 2 (PHP Snippet): Move Login/Registration Below the Billing Section @ WooCommerce Checkout

 * @snippet       Move Login @ WooCommerce Checkout
 * @how-to        Watch tutorial @ https://businessbloomer.com/?p=19055
 * @author        Rodolfo Melogli
 * @compatible    WC 3.5.4
 * @donate $9     https://businessbloomer.com/bloomer-armada/

remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_login_form', 10 );
add_action( 'woocommerce_after_checkout_billing_form', 'woocommerce_checkout_login_form' );

Where to add this snippet?

You can place PHP snippets at the bottom of your child theme functions.php file (before "?>" if you have it). CSS, on the other hand, goes in your child theme style.css file. Make sure you know what you are doing when editing such files - if you need more guidance, please take a look at my free video tutorial "Where to Place WooCommerce Customization?"

Does this snippet (still) work?

Please let me know in the comments if everything worked as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting on PHP 7+.

If you think this code saved you time & money, please join other Business Bloomer supporters and avail of 365 days of WooCommerce benefits. Thank you in advance :)

Need Help with WooCommerce Customization?

Check out these free video tutorials!

  • how-to-edit-woocommerce-with-php-snippets
  • woocommerce-hooks-add_action-list-visual
  • woocommerce-customize-single-product-page-PHP

Rodolfo Melogli

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as a WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza.

29 thoughts on “WooCommerce: Remove or Move User Login / Registration at Checkout

  1. Hi Rodolfo!

    I have been trying to make a button of “Click here to login” instead of a plain linked-text.

    How can I do it?

    Thank You.

    1. Hello Younes, thanks so much for your comment! Yes, this is possible – unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

  2. Hi! I want to turn off the registration option, but I don’t see all the options that you show in this article. I don’t have the tab ‘accounts’ in my woocommerce settings page.

    How is that possible? I got the latest woocommerce version!

    Hope you can help me! Thnx!


    1. Hey Janneke, thanks for your comment! Try under “Accounts and Privacy”, it’s my screenshot that is out of date ๐Ÿ™‚

  3. Hi Rodolfo,

    Firstly thanks for your nice blog to support woo-commerce user and developer. I need a solution for woocommerce store. I want people can only register after they purchase product. Now they can register at checkout page but before they pay registration is completed. Without payment the can access dashboard. I want to restrict it. Would you please help me to do this. Actually I want who purchase product can only get dashboard access.
    Thanks in advance.


    1. Hello Abdullah, thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

  4. This doesn’t really work properly. All it does is take the customer to a page that tells them they have to login to purchase from the store, but it doesn’t allow them to create an account nor does it even give a link to an account creation page.

    So, essentially, this is worse since it is confusing to customer as it is unhelpful and illogical. Customers will leave and/or it will create excessive customer service emails

    My guess is that Woocommerce wants you to pay them for a proper “account creation before checkout” process, which I am not about to do.

    1. Hey Chuckers, you can enable “Guest” checkout from the settings and avoid the account creation process ๐Ÿ™‚

  5. I am trying to move the Create an Account to the top of my checkout page. Could someone please help me.

    1. Karen, thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

  6. Hello Dear,

    Thank you for the instructions they are so helpful, but I want to ask if there is a way to add login link when it comes to “You must be logged in to checkout.”

    Thank you again ๐Ÿ™‚

    1. Hello Tamara, thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here on the blog. Thanks a lot for your understanding! ~R

  7. Hello,

    I was wondering if it’s possible to move the actual registration form on the checkout page above the form, just like the login form? I tried to move it myself, but it’s not working. It appears fine, but if you insert a username and password, and place a (test) order, it’s not working. The account isn’t created. Any tips?


    1. Hey Alex, thanks for your message. Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here on the blog. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding! ~R

  8. Hi!

    Here is my problem:

    I have a membership site (using wooommerce Sensei). On the checkout page the client gives his information and can make the payment via Paypal or wire transfer. My problem is that the account for the client is already created even if he or she does not finalize the payment. Basically one can choose wire transfer, never make the payment, but account is created and he/she already has access to the member area and the content.

    My goal would be: Unless the payment is done (returning from Paypal after succesful payment or I have manually marked the order succesful on the system if wire transfer is used), then no account is generated for the person. WHEN it is done, however, account should be created automatically and sent to the e-mail of the client (which is entered during the ordering process).

    Any recommendations?

    Thank you!


    1. Mikk, thanks for your comment and very interesting challenge you have! Unfortunately the “wire transfer” option is messing up the whole flow there, and as you said accounts get created even if payment is not done.

      What about disabling account registration on the checkout, and do this on the “payment received” page or “completed order” email instead?

      Or otherwise, why not assigning a “paid” membership to users, that gets assigned only when payment is made? Then, only “paid” members will be able to access Sensei courses.

      Let me know!

  9. Dear Rodolfo

    I am not a techie, and volunteering for a non-profit website. So, kindly bear with this question ๐Ÿ™‚

    We want to achieve the following:
    1. Force the user to login first, before they can checkout
    2. How can I use your suggestion of “” in the reverse? Will this be enough to check condition 1 above or some more work is required?

    Using WP 4.5.1 and Woo 2.5.5

    Thank you in advance.

    1. Hey Vy, thanks for your comment ๐Ÿ™‚ All you need is disabling Guest Checkout (WooCommerce > Settings > Checkout > Enable guest checkout (untick). Other than that, I’m not sure what you mean at point 2) so maybe let me know! Thanks ๐Ÿ™‚

      1. Thanks for your inputs. ๐Ÿ™‚

        I was wondering if using the opposite of your suggestion in this thread
        would help us achieve the feature of showing the checkout page only to logged in users. If not logged in, then I want to show /my-account/ page.

        Best wishes.

        1. Yes Vy, all you need is disabling Guest Checkout (WooCommerce > Settings > Checkout > Enable guest checkout (untick)). After that, checkout will not be accessible unless you’re logged in/registered

          1. Thanks Rodolfo, I used this feature on the Admin page, but it works differently to our requirement. For example, the checkout page is shown, along with the “registration fields” included in the same page.

            Instead, we want that the user should log-in/register “before” the checkout page is shown. Something like cart–>login/register–>checkout ๐Ÿ™‚

            Sorry, but this is for a specific reason. ๐Ÿ™‚


            1. Understood ๐Ÿ™‚ To redirect from My Account to Checkout is super easy (check this tutorial by WooThemes). Hope this helps!

      2. Dear Rodolfo

        I found this on the stackexchange.

        //Woocommerce visible only to logged-in users
        function wpse_131562_redirect() {
            if (
                ! is_user_logged_in()
                && (is_checkout())
            ) {
                // feel free to customize the following line to suit your needs
        add_action('template_redirect', 'wpse_131562_redirect');

        The above code is allowing for checking if user is logged in (for checkout page only) and if not, then redirects to “my-account” page.

        This is the closest I could find. And tested it by pasting it in my child-theme functions.php page.

        I am trying to learn how to make this code more useful – the user should login –> thereafter be redirected to the checkout page, no?

        Very grateful for any thoughts/help in this regard?

  10. Hello
    I run a woocoommerce site where I want people to register. Everything about the account is working. However I want to hide the “login” from my menu when a customer is logged in. I ahve added css class for the login-page (nav-login) and the same for the my account page (nav-account). Could you tell me the code to hide the login page and it’s subcategories such as log-out, edit adress when a customer is logged in and where I should add the code.

    1. Erik thank you for your comment! You could do something similar to this: https://businessbloomer.com/wordpress-add-css-specific-page-url-via-php. You can then edit that snippet by using the conditional tag is_user_logged_in and echoing CSS if the IF statement returns true. Does this help? ๐Ÿ™‚

  11. Dear Rodolfo,

    Can you tell please where I should put this code to switch off login form from checkout page ?

    // move login at checkout from above form to above billing
    remove_action( ‘woocommerce_before_checkout_form’, ‘woocommerce_checkout_login_form’, 10 );
    add_action( ‘woocommerce_before_checkout_billing_form’, ‘woocommerce_checkout_login_form’ );

    1. Olegs, thanks for your message! I’m going to record a video about this, as many of you had the same issue. I will let you know when this is available! R

  12. Yep, great method for touching the login form in the checkout page, thank you Rodolfo,

    Do you have any idee how to remove the login form frm the my account page when the visitor is not logged in?

    1. Thank you Alex ๐Ÿ™‚ You could simply use < ?php if ( is_user_logged_in() ) { ... } ?> to hide the whole form. Let me know!

Questions? Feedback? Support? Leave your Comment Now!

If you are writing code, please wrap it between: [php]code_here[/php]. Failure to complying with this (as well as going off topic) will result in comment deletion. You should expect a reply in about a week - this is a popular blog but I need to get paid work done first. Please consider joining #BloomerArmada to ask me 1-to-1 WooCommerce questions. Thank you :)

Your email address will not be published. Required fields are marked *

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