• Resolved dassels43

    (@dassels43)


    When attempting checkout, keep getting this error:

    Uncaught (in promise) IntegrationError: You specified "never" for fields.billing_details.address.line2 when creating the payment Element, but did not pass params.billing_details.address.line2 when calling stripe.createPaymentMethod(). If you opt out of collecting data via the payment Element using the fields option, the data must be passed in when calling stripe.createPaymentMethod().

    Any ideas what can be causing this? When using the Legacy version everything works fine.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @dassels43,

    Thank you for reaching us about this issue. This is unusual and it may mean something else is interferring with your install. With this in mind, 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.

    You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.

    Once we have more information, we’ll be able to assist you further.

    Thanks!
    -OP

    Thread Starter dassels43

    (@dassels43)

    Hi, here is the system report:

    https://gist.github.com/dassels/556db362651e74c0dea7ab45c5494974

    There are no fatal errors or any other info in the log, as this seems to be purely JS related and those aren’t picked up the logger.

    This is the only entry that shows when the debug is turned on in Stripe:

    2024-04-27T07:21:09+00:00 Debug ====Stripe Version: 8.2.0==== ====Stripe Plugin API Version: 2019-09-09==== ====Start Log==== account ====End Log====
    • This reply was modified 2 years, 1 month ago by dassels43.
    Thread Starter dassels43

    (@dassels43)

    Ok, we found the issue. The new checkout is looking for billing fields “phone” and “address2” to exist. We remove this from the checkout as this information is not required in order to process the transaction since it is only digital products that are sold. If we put the back the fields the JS error goes away. There should be a modification to the JS code to allow that to be optional. The legacy version doesn’t generate JS validation for those fields not existing.

    Zee

    (@doublezed2)

    Hello dassels43

    Thank you for your reply.

    I am glad to know that you have found the cause of the issue.
    May I ask how you have removed the billing fields?

    Please let me know. 🙂

    Best regards.

    Thread Starter dassels43

    (@dassels43)

    We’re using a page builder called “Bricks Builder”. This allows you to configure the checkout form fields. You can remove fields from the form in the editor and it won’t show in the front end. Exactly how it achieves this I don’t know as I haven’t looked into the code.

    Anyway, removing the fields directly in functions.php seems to work and allow the checkout to continue whilst also removing the fields from the frontend.

    Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @dassels43

    Thanks for sharing the solution with the community! 🙂

    Should you have further inquiries, kindly create a new topic here.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Javascript error when using New Checkout Experience’ is closed to new replies.