Merge pull request #11252 from jluisfreitas/patch-2
add PT (Portugal) postcode format
This commit is contained in:
commit
3ed7e3574a
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue