Do you want a quick solution to allow customers in your WooCommerce store to create an account at the checkout page?
If yes, you are in the right place. In this tutorial, I will share how you can add a registration form on the checkout page for visitors.
WooCommerce Create Account at Checkout
There are several reasons why you may want customers to create an account on the checkout page. Some of them include:
- It is easier for customers to manage their orders and get support.
- It is for the customer to purchase again (all their details are saved).
- It is easier for the store manager to track the lifetime value of customers.
However, you should keep in mind that first-time customers’ checkout process should still be as seamless as possible.
WooCommerce has built-in functionality for this, allowing first-time visitors to create a new account automatically.
Steps to Create an Account at the WooCommerce Checkout Page
Here are the steps that you need to follow:
- Log into your WordPress site and access the dashboard as the admin user
- Navigate to WooCommerce > Settings.
- Click on the Accounts & Privacy tab.
- Check the following options:
- 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.
When new customer checks out from your site, they will be sent a welcome email with their new account login information.
Tweaking the Email
This template generates the new account email text. By default, the email sends new customers a generated username to log into their accounts.
However, users have been able to log in with their email addresses since WordPress 4.5.
Instead, I send an email that informs the customer they can log in with their email using the following code snippet:
<?php /** * Customer new account email * * This template has been overriden to change account creation text. * * @see https://docs.woocommerce.com/document/template-structure/ */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } ?> <?php do_action( 'woocommerce_email_header', $email_heading, $email ); ?> <p><?php printf( __( 'An account has been created for you on %1$s.', 'woocommerce' ), esc_html( $blogname ) ); ?></p> <p><?php printf( __( 'You can log in with your email address: %1$s', 'woocommerce' ), '<strong>' . esc_html( $email->user_email ) . '</strong>' ); ?></p> <?php if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) && $password_generated ) : ?> <p><?php printf( __( 'Your password has been automatically generated: %s', 'woocommerce' ), '<strong>' . esc_html( $user_pass ) . '</strong>' ); ?></p> <?php endif; ?> <p><?php printf( __( 'You can access your account area to view your orders and change your password here: %s.', 'woocommerce' ), make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); ?></p> <?php do_action( 'woocommerce_email_footer', $email );
This code sends new WooCommerce customers an account email with their email address as a login rather than a username.
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.
Conclusion
In summary, you have learned how to create an account at the checkout page using the WooCommerce built-in options.
Additionally, I have shared a custom template code snippet that sends new WooCommerce customers an account email with their email address as a login rather than a username. If you are not familiar with editing code, please contact a qualified WordPress developer so that you do not break down your site.
Joe is an experienced full-stack web developer with a decade of industry experience in the LAMP & MERN stacks, WordPress, WooCommerce, and JavaScript – (diverse portfolio). He has a passion for creating elegant and user-friendly solutions and thrives in collaborative environments. In his spare time, he enjoys exploring new tech trends, tinkering with new tools, and contributing to open-source projects. You can hire me here for your next project.
Similar Articles
- How to Remove Additional Information Checkout Page WooCommerce
- How to Change WooCommerce Checkout Error Messages
- How to Change WooCommerce Checkout Labels
- How to Add Select Field to Checkout WooCommerce
- How to Set Up WooCommerce Terms and Conditions Checkout
- How to Refresh Checkout Page WooCommerce
- How to Add Hidden Field on WooCommerce Checkout Page
- How to Add WooCommerce Invoice Checkout Page
- How to Force Secure Checkout In WooCommerce
- How to Add WooCommerce Checkout Email Validation