How to Rearrange Checkout Fields in WooCommerce

Today we will talk about how to Rearrange Checkout Fields in WooCommerce. Before beginning, you should learn that checkout fields in WooCommerce are divided into 4 groups, which are:

Billing – Contains billing addresses

Shipping – Contains billing addresses

Order – Contains order information

Account – Contains order information

Each of these fields contains a priority parameter that decides the field arrangement. The following code will be found in the function.php file of your theme/child theme:

add_filter( 'woocommerce_checkout_fields', 'qaisarsatti_field_Sort' );

function qaisarsatti_field_Sort( $checkoutFields ) {
  $checkoutFields[ 'billing' ][ 'billing_email' ][ 'priority' ] = 2;
  return $checkoutFields;
}

Just change the priority to rearrange the field placement, as I have done in the above example where I have set the email field’s priority to 2.

Qaisar Satti

Hi, I'm Qaisar Satti! I've been a developer for over 20 years, and now I love sharing what I've learned through tutorials and guides. Whether you're working with Magento, PrestaShop, or WooCommerce, my goal is to make your development journey a bit easier and more fun. When I'm not coding or writing, you can find me exploring new tech trends and hanging out with the amazing developer community. Thanks for stopping by, and happy coding!