mirror of https://github.com/itflow-org/itflow
If no country code is entered display the number only no spaces hyphens or perenthesis
This commit is contained in:
parent
98bb65509d
commit
42606067c0
|
|
@ -320,12 +320,7 @@ function formatPhoneNumber($phoneNumber, $country_code = '', $show_country_code
|
|||
break;
|
||||
}
|
||||
|
||||
// Fallback if formatting failed
|
||||
if (!$formatted && strlen($digits) >= 7) {
|
||||
$formatted = substr($digits, 0, 3) . ' ' . substr($digits, 3, 3) . ' ' . substr($digits, 6);
|
||||
}
|
||||
|
||||
// Still no formatting? Use raw digits
|
||||
// no formatting? Use raw digits
|
||||
if (!$formatted) {
|
||||
$formatted = $digits ?: $phoneNumber; // Use original input if digits are empty
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue