Added appropriate postcode formatting for Puerto Rico

This commit is contained in:
Christopher Allford 2020-12-03 11:57:30 -08:00
parent d59b47903f
commit 6780e3e07d
1 changed files with 1 additions and 0 deletions

View File

@ -962,6 +962,7 @@ function wc_format_postcode( $postcode, $country ) {
case 'PT':
$postcode = substr_replace( $postcode, '-', 4, 0 );
break;
case 'PR':
case 'US':
$postcode = rtrim( substr_replace( $postcode, '-', 5, 0 ), '-' );
break;