Skip to content

Instantly share code, notes, and snippets.

@danielbitzer
Created December 22, 2017 14:07
Show Gist options
  • Save danielbitzer/397ee4d9da8fb2fab281c5de16b893f9 to your computer and use it in GitHub Desktop.
Save danielbitzer/397ee4d9da8fb2fab281c5de16b893f9 to your computer and use it in GitHub Desktop.
WooCommerce Checkout - Make the email field appear first
<?php
// Minimum version WC 3.0
add_filter( 'woocommerce_checkout_fields', 'my_filter_woocommerce_checkout_fields');
function my_filter_woocommerce_checkout_fields($fields) {
$fields['billing']['billing_email']['priority'] = 5;
$fields['billing']['billing_email']['class'] = array( 'form-row-wide' );
return $fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment