• Resolved claudiaiw

    (@claudiaiw)


    Hi,

    I have a strange problem with the phone field in block checkout.
    Some customer phone numbers contain a hyphen (?) surrounded by whitespaces: ” – ”
    e.g. 0172 – 1234567

    When the checkout loads, this is changed to a dash (?): ” – ”
    0172 – 1234567
    and that leads to a failed validation, you can see it here: https://ibb.co/GkHRZSJ

    We tested this with the classic checkout in a staging environment, there this error does not occur.
    We also deactivated several plugins that possibly could interfere and cause this problem, but it didn’t help. Core and plugins are all up to date.

    Searched for similar topics but found nothing.. any idea?

    Regards
    Claudia

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey there, @claudiaiw! Thanks for contacting us. I’m happy to help you.

    Just to confirm, this issue happens when you use the block check out page, but not the short code check out, correct?

    I tried to replicate this issue on my website, but the order was completed.

    I’d like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:

    System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support.
    Fatal error logs (if any) under WooCommerce > Status > Logs. Then you can use the selector to search for Fatal Errors.
    You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter claudiaiw

    (@claudiaiw)

    Hi,

    thanks for the quick answer and yes it’s only with block check out page.

    In my testing environment I deactivated all plugins except WooCommerce, switched the theme to Twenty Twenty-Four and set the language to English.
    The error is still there. Checking the phone number in “my account” its fine, the block checkout still changes the – to – and displays the failed validation.

    As a reminder, that does not happen without blanks around the – !

    Searched for the string in the source code and found this in the JSON.parse line:
    0172%20%26%238211%3B%201234567
    (the visible and failed phone number is 0172 – 1234567)

    System report: https://gist.github.com/ideenwerft/750498ebc7f34dcdfdc3a09a4f4f73a6

    Found no fatal errors.

    I can give you access to the test environment if that helps.

    Maybe you find something, otherwise we will simply eliminate all blanks in phone numbers in the database.

    ?? hey @claudiaiw

    I went ahead with testing, on a test site of mine, having the shortcode-based Checkout page, and the Billing Phone validation issue appeared on my end, when using either 0172 – 1234567, or 0172 – 1234567, or 0172–1234567. (copied and pasted, as is, from your original message here)

    yes it’s only with block check out page.

    +

    otherwise we will simply eliminate all blanks in phone numbers in the database.

    This sounds like the way to proceed, in your case, as your set up allows for it.

    I hope this is helpful! Please let us know if you have any further questions or concerns.
    We will be happy to help you further.

    Thread Starter claudiaiw

    (@claudiaiw)

    Hi,

    just saw that the editor here changes the dash into a simple – when submitting.

    But anyway, we deleted all blanks via the database. So the problem will only occur in the case that someone new registers and uses ” – ” in the phone field. We put a hint in the label of the phone field in checkout for this case.

    Thanks for the support

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @claudiaiw,

    I’m glad to hear that you’ve found a workaround by deleting all blanks via the database.

    If you have a few minutes, we’d love if you could leave us a review: https://www.ads-software.com/support/plugin/woocommerce/reviews/

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Checkout changes phone from ” – ” into dash and failed validation’ is closed to new replies.