Last active
October 30, 2023 07:53
-
-
Save SirDarcanos/71d67bbce0f89ead1ce58bf40f722662 to your computer and use it in GitHub Desktop.
How to Customise the Address Format in WooCommerce
This file contains hidden or 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 | |
add_filter( 'woocommerce_localisation_address_formats', 'change_us_address_format' ); | |
function change_us_address_format( $formats ) { | |
$formats['US'] = "{name}\n{company}\n{address_1}\n{address_2}\n{city}, {state} {postcode}\n{country}"; | |
return $formats; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment