How to move the email address field to the top of the Woocommerce checkout page. I think it’s no secret that I love Woocommerce, but one thing that I strongly believe is that it captures the customers email far too late in the
checkout process. Being able to capture a shoppers email address early on in the process is an important factor. The earlier it is captured, the better chance you have of remarketing that buyer should they decide to abandon their cart before completing the form. This is something that Shopify does quite well, but Woocommerce can also do it.
This neat little snippet will move the email form from the bottom of the billing address field to the top, meaning that you will more quickly capture the email address and be able to target the shopper if they leave early.
/*
* Snippet Move email form to top of Woocommerce checkout page
* how-to Read at https://wcsuccessacademy.com/?p=375
* source code https://wcsuccessacademy.com/?p=375
* author John Cook
* tested with WooCommerce 3.3.3
*/
function move_my_email_fields( $address_fields ) {
$address_fields[‘billing_email’][‘priority’] = 9;
return $address_fields;
}
add_filter( ‘woocommerce_billing_fields’, ‘move_my_email_fields’, 10, 1 );
This is what it should look like
Where does this code go?
As with all other snippets, it should be placed at the end of the child theme functions.php file before the closing ?> (if your file has it). Alternatively, you can use a custom functions plugin to make these edits which is much safer and can be carried between themes.
Does it work for you?
Did this snippet for how to move the email form on the Woocommerce checkout page to the top work for you? Leave a comment below.
I have been working with WordPress and WooCommerce since 2012 and have developed a deep knowledge of the content management system. Since 2012, I have developed several plugins and designed dozens of websites utilising different frameworks, CMS’s and programming languages.
On a professional level, I’m currently undertaking PhD studies investigating IoT cybersecurity. I recently graduated with First Class Honours and Masters of Information Technology, receiving the Executive Dean’s Award for studies undertaken in the 2021 and 2022 academic years. I have worked in the information technology industry for the past 11 years primarily as a software/web developer specific to design, optimisation, network management and security. My research interests are in the areas of Internet of Things (IoT), 5G and Beyond Networks and information security for wireless networks and software development.
Google Scholar ID: https://scholar.google.com.au/citations?user=0KvpwNEAAAAJ&hl=en
ORCID: https://orcid.org/0000-0001-8113-1296
Discover more from WC Success Academy
Subscribe to get the latest posts to your email.