From 42606067c093daa556282504ae63151983d95b00 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sun, 30 Mar 2025 12:22:43 -0400 Subject: [PATCH] If no country code is entered display the number only no spaces hyphens or perenthesis --- functions.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/functions.php b/functions.php index 3176c6ba..f2d0ca37 100644 --- a/functions.php +++ b/functions.php @@ -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 }