Automatic Accounts on WooCommerce Checkout

There are a lot of good reasons to require a customer account on checkout:

  • It’s easier for customers to manage their orders and get support.
  • It’s for customer to purchase again (all their details are saved).
  • It’s easier for store manager to track life time value of customers.

However, the checkout process for first time customers should still be as seamless as possible. This is why I like to create accounts automatically if the email hasn’t been used before. WooCommerce has this functionality built-in.

How to Set Up Automatic Accounts

Go to your WooCommerce “Accounts & Privacy” Settings and check the following:

  • Allow customers to create an account during checkout.
  • When creating an account, automatically generate a username from the customer’s email address.
  • When creating an account, automatically generate an account password.

Now when a new customer checks out from your site, they will be sent a welcome email with their new account log in information.

Tweaking the Email

The new account email text is generated by this template. By default the email sends new customers a generated username to log into their account. However, users have been able to log in with their email address since WordPress 4.5, so it seems weird to make them remember an arbitrary username we’ve created.

Instead, I send an email that let’s the customer know they can log in with their email using this code snippet.

If you’re not interested in editing code on your site, you could also use a plugin like Email Customizer for WooCommerce to make the modifications.

P.S. If you use coupons on your WooCommerce site, check out my Coupon Restrictions extension.

About Devin

I am a developer based in Austin, Texas. I run a little theme shop called DevPress and help manage a WooCommerce shop with Universal Yums. Find me on twitter @devinsays.

10 Responses

  1. Not sure if this worked with a previous version of WordPress / Woocommerce, but as of this month (Sept. 2018), these settings do not automatically create accounts for everyone checking out.

  2. Nice article Devin, thanks for sharing. However I have a little challenge with this ecommerce feature. I used it for a course platform I designed with learndash using woocommerce and I noticed that once the pay button is pushed, username and password are generated immediately whether or not the payment was successful or was declined. Is there a way to work around this?
    Thanks.

  3. Sandz

    Thanks for sharing this Devin. Can you please tell me that nowadays, by default “Allow customers to create an account on my accounts page” is checked. What do you recommend shall we check it or not? I just want that every customer essentially makes an account. That’s it.

  4. aaa aaa

    This does not automatically create user accounts. The user still has to check the “Create an account” checkbox on the WooComm checkout page.

  5. Hey, I have these settings but a user has to click “create an account” on the checkout page for the account to be created, otherwise no account is created. How can I force that instead of making it optional? Thanks

    1. San

      Add a plugin for code snippets. Create a new snippet

      add_filter(‘woocommerce_create_account_default_checked’, ‘__return_true’);

Leave a Reply