Created
August 21, 2019 20:16
-
-
Save clifgriffin/a46d352c8287dd158866e860965056c8 to your computer and use it in GitHub Desktop.
How to reorder address fields for Checkout for WooCommerce.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Do NOT include the opening php tag. | |
// Place in your theme's functions.php file | |
add_action( 'woocommerce_default_address_fields', 'cfw_reorder_address_fields', 100000 + 10 ); | |
function cfw_reorder_address_fields( $fields ) { | |
$fields['city']['priority'] = 50; | |
$fields['city']['columns'] = 4; | |
$fields['state']['priority'] = 60; | |
$fields['state']['columns'] = 12; | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment