Quantcast
Channel: WordPress.org Forums » [WooCommerce] Support
Viewing all articles
Browse latest Browse all 104029

terrytsang on "[Plugin: WooCommerce - excelling eCommerce] How to Customise checkout fields"

$
0
0

Hi furumachi. If you like to change the order of first name and last name, there is a quick fix.

1) Open your theme functions.php (located at wp-content/themes/[your-theme-name]/functions.php)

2) Add below code at bottom section:

// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );

function custom_override_checkout_fields( $fields ) {
	$fields['billing']['billing_first_name']['class'] = array('form-row-last');
	$fields['billing']['billing_last_name']['class'] = array('form-row-first');

	return $fields;
}

Viewing all articles
Browse latest Browse all 104029

Trending Articles