Title: Javascript error when using New Checkout Experience
Last modified: April 26, 2024

---

# Javascript error when using New Checkout Experience

 *  Resolved [dassels43](https://wordpress.org/support/users/dassels43/)
 * (@dassels43)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/javascript-error-when-using-new-checkout-experience/)
 * When attempting checkout, keep getting this error:
 *     ```wp-block-code
       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](https://wordpress.org/support/users/omarfpg/)
 * (@omarfpg)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/javascript-error-when-using-new-checkout-experience/#post-17716840)
 * Hi [@dassels43](https://wordpress.org/support/users/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/](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](https://wordpress.org/support/users/dassels43/)
 * (@dassels43)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/javascript-error-when-using-new-checkout-experience/#post-17717297)
 * Hi, here is the system report:
 * [https://gist.github.com/dassels/556db362651e74c0dea7ab45c5494974](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:
 *     ```wp-block-code
       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](https://wordpress.org/support/users/dassels43/).
 *  Thread Starter [dassels43](https://wordpress.org/support/users/dassels43/)
 * (@dassels43)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/javascript-error-when-using-new-checkout-experience/#post-17717326)
 * 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](https://wordpress.org/support/users/doublezed2/)
 * (@doublezed2)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/javascript-error-when-using-new-checkout-experience/#post-17717482)
 * Hello [dassels43](https://wordpress.org/support/users/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](https://wordpress.org/support/users/dassels43/)
 * (@dassels43)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/javascript-error-when-using-new-checkout-experience/#post-17718498)
 * We’re using a page builder called “Bricks Builder”. This allows you to configure
   the [checkout form fields](https://academy.bricksbuilder.io/article/checkout/).
   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](https://wordpress.org/support/users/shameemreza/)
 * (@shameemreza)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/javascript-error-when-using-new-checkout-experience/#post-17718529)
 * Hi [@dassels43](https://wordpress.org/support/users/dassels43/)
 * Thanks for sharing the solution with the community! 🙂
 * Should you have further inquiries, kindly [create a new topic here](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/#new-topic-0).
 * Thanks!

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

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

 * ![](https://ps.w.org/woocommerce-gateway-stripe/assets/icon-256x256.png?rev=3177277)
 * [WooCommerce Stripe Payment Gateway](https://wordpress.org/plugins/woocommerce-gateway-stripe/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-gateway-stripe/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [Shameem – a11n](https://wordpress.org/support/users/shameemreza/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/javascript-error-when-using-new-checkout-experience/#post-17718529)
 * Status: resolved