Skip to content

Instantly share code, notes, and snippets.

@webdados
Last active November 17, 2016 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webdados/916a0ed0716f7271c82496067d2967d9 to your computer and use it in GitHub Desktop.
Save webdados/916a0ed0716f7271c82496067d2967d9 to your computer and use it in GitHub Desktop.
Change WooCommerce address format for Portugal
<?php
add_filter('woocommerce_localisation_address_formats','custom_woocommerce_localisation_address_formats');
function custom_woocommerce_localisation_address_formats($formats) {
//$formats['default']="{name}\n{company}\n{address_1}\n{address_2}\n{postcode} {city}\n{state}\n{country}";
$formats['PT']="{name}\n{company}\n{address_1}\n{address_2}\n{postcode} {city}\n{state}\n{country}";
return $formats;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment