Merge pull request #17291 from michaelrimbach/patch-1

Format PL (Poland) Postal Code
This commit is contained in:
Gerhard Potgieter 2017-10-24 05:13:13 -07:00 committed by GitHub
commit ec6379a6ec
1 changed files with 3 additions and 0 deletions

View File

@ -839,6 +839,9 @@ function wc_format_postcode( $postcode, $country ) {
case 'US' :
$postcode = rtrim( substr_replace( $postcode, '-', 5, 0 ), '-' );
break;
case 'PL' :
$postcode = trim( substr_replace( $postcode, '-', 2, 0 ) );
break;
}
return apply_filters( 'woocommerce_format_postcode', $postcode, $country );