Skip to content

Instantly share code, notes, and snippets.

View jeetsinghb's full-sized avatar
🕊️
Focusing to Create a Better Life

Tarjeet Singh jeetsinghb

🕊️
Focusing to Create a Better Life
  • ExellarTech
  • India
View GitHub Profile
@jeetsinghb
jeetsinghb / woo-checkout-fields.php
Created May 25, 2021 09:56 — forked from bavington/woo-checkout-fields.php
Reorder Checkout Fields in WooCommerce
// Reorder Checkout Fields
add_filter('woocommerce_checkout_fields','reorder_woo_fields');
function reorder_woo_fields($fields) {
$fields2['billing']['billing_email'] = $fields['billing']['billing_email'];
$fields2['billing']['billing_first_name'] = $fields['billing']['billing_first_name'];
$fields2['billing']['billing_last_name'] = $fields['billing']['billing_last_name'];
$fields2['billing']['billing_country'] = $fields['billing']['billing_country'];
$fields2['billing']['billing_address_1'] = $fields['billing']['billing_address_1'];
$fields2['billing']['billing_address_2'] = $fields['billing']['billing_address_2'];