Move Email Field to Top on Checkout Page

Moving the billing email field to the top of the WooCommerce checkout gives you many benefits: because it’s the first field customers need to fill out, you can capture their email address and send them cart reminders, feedback requests and similar if they do not complete the checkout.

/**
 * @snippet       Move Email Field To Top
 * @author        codeithub.com
 */
  
add_filter( 'woocommerce_billing_fields', 'codeithub_move_checkout_email_field' );
 
function codeithub_move_checkout_email_field( $address_fields ) {
    $address_fields['billing_email']['priority'] = 1;
    return $address_fields;
}

Before:

See also  Redirect to checkout page after add to cart
Default Checkout Page

After:

Email Field at the Top

Leave a Reply

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