# Move the Email Field to the Top of Checkout

> Puts the billing email field first on the classic checkout so you capture the address early, which also helps abandoned cart tools.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, checkout, fields
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-email-first-checkout/

## Code

```php
add_filter( 'woocommerce_billing_fields', function ( $fields ) {
    if ( isset( $fields['billing_email'] ) ) {
        $fields['billing_email']['priority'] = 1;
        $fields['billing_email']['class']    = array( 'form-row-wide' );
    }

    return $fields;
}, 20 );
```

## Notes

Only affects the classic checkout shortcode. The block checkout already asks for the email first.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Move the Email Field to the Top of Checkout" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
