Allow "(", and ")" in wc_format_phone_number()

This commit is contained in:
Claudio Sanches 2019-06-19 17:39:08 -03:00
parent 9e641e08dd
commit 7073c6b3a2
1 changed files with 1 additions and 1 deletions

View File

@ -976,7 +976,7 @@ function wc_format_phone_number( $phone ) {
if ( ! WC_Validation::is_phone( $phone ) ) {
return '';
}
return preg_replace( '/[^0-9\+\-\s]/', '-', preg_replace( '/[\x00-\x1F\x7F-\xFF]/', '', $phone ) );
return preg_replace( '/[^0-9\+\-\(\)\s]/', '-', preg_replace( '/[\x00-\x1F\x7F-\xFF]/', '', $phone ) );
}
/**