WordPress.org

Support

Support » Plugins and Hacks » WooCommerce » How to Customise checkout fields

How to Customise checkout fields

Viewing 1 replies (of 1 total)
  • 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 1 replies (of 1 total)
  • The topic ‘How to Customise checkout fields’ is closed to new replies.
Skip to toolbar