This changes wc_format_phone_number to discard all characters except numbers and the + sign, not sure if + sign must be stripped but in the current version it was not stripping the + sign
This commit is contained in:
parent
3bff14974c
commit
7a3caa0608
|
@ -941,7 +941,7 @@ function wc_normalize_postcode( $postcode ) {
|
|||
* @return string
|
||||
*/
|
||||
function wc_format_phone_number( $phone ) {
|
||||
return str_replace( '.', '-', $phone );
|
||||
return preg_replace( '/[^0-9\+]/', '', $phone );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue