Merge pull request #11252 from jluisfreitas/patch-2

add PT (Portugal) postcode format
This commit is contained in:
Mike Jolley 2016-06-27 11:53:05 +01:00 committed by GitHub
commit 3ed7e3574a
1 changed files with 3 additions and 0 deletions

View File

@ -665,6 +665,9 @@ function wc_format_postcode( $postcode, $country ) {
case 'BR' :
$postcode = trim( substr_replace( $postcode, '-', -3, 0 ) );
break;
case 'PT' :
$postcode = trim( substr_replace( $postcode, '-', 4, 0 ) );
break;
}
return apply_filters( 'woocommerce_format_postcode', $postcode, $country );