ZIP Code formatting for Poland

In Poland we use ZIP code formatting: XX-XXX. So the "-" sign should
not be removed.
This commit is contained in:
Maciej Swoboda 2016-08-03 16:06:30 +02:00
parent 4271617c79
commit 24235564d5
1 changed files with 3 additions and 0 deletions

View File

@ -668,6 +668,9 @@ function wc_format_postcode( $postcode, $country ) {
case 'JP' :
$postcode = trim( substr_replace( $postcode, '-', 3, 0 ) );
break;
case 'PL' :
$postcode = trim( substr_replace( $postcode, '-', -3, 0 ) );
break;
case 'PT' :
$postcode = trim( substr_replace( $postcode, '-', 4, 0 ) );
break;