Title: JS Error when saved card
Last modified: October 19, 2022

---

# JS Error when saved card

 *  Resolved [nikhil.chaudhary](https://wordpress.org/support/users/nikhilchaudhary/)
 * (@nikhilchaudhary)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/js-e/)
 * Where we have the saved card available on the checkout page, the plugin generates
   the JS error:
 *     ```
       jquery.min.js:2 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
           at Function.each (jquery.min.js:2:2819)
           at HTMLBodyElement.update_elements (payment-methods.js?ver=3.2.32:49:15)
           at HTMLBodyElement.dispatch (jquery.min.js:3:8436)
           at r.handle (jquery.min.js:3:5139)
           at Object.trigger (jquery.min.js:3:7537)
           at HTMLBodyElement.<anonymous> (jquery.min.js:3:15404)
           at Function.each (jquery.min.js:2:2973)
           at m.fn.init.each (jquery.min.js:2:835)
           at m.fn.init.trigger (jquery.min.js:3:15380)
           at Object.success (checkout.js?ver=5.8.0:429:25)
       ```
   
    -  This topic was modified 3 years, 7 months ago by [nikhil.chaudhary](https://wordpress.org/support/users/nikhilchaudhary/).

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

 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/js-e/#post-16113346)
 * Hi [@nikhilchaudhary](https://wordpress.org/support/users/nikhilchaudhary/)
 * Can you share a website url where this error can be observed? That’s not a typical
   error so it’s most likely related to your site setup.
 * Have you customized any of the plugin’s templates?
 * Thanks,
 *  Thread Starter [nikhil.chaudhary](https://wordpress.org/support/users/nikhilchaudhary/)
 * (@nikhilchaudhary)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/js-e/#post-16113423)
 * Here you go: [https://secure.healthymummy.com/](https://secure.healthymummy.com/)
   **
   Note:** This only happens when the current user already has a saved card.
    -  This reply was modified 3 years, 7 months ago by [nikhil.chaudhary](https://wordpress.org/support/users/nikhilchaudhary/).
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/js-e/#post-16115390)
 * Hi [@nikhilchaudhary](https://wordpress.org/support/users/nikhilchaudhary/)
 * Can you contact us using the support widget in the Braintree plugin settings?
   We will need to assist you via that support channel, as we need more information
   to continue troubleshooting.
 * Here is another support link: [https://paymentplugins.com/contact-us/](https://paymentplugins.com/contact-us/)
 * Kind Regards,

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

The topic ‘JS Error when saved card’ is closed to new replies.

 * ![](https://ps.w.org/woo-payment-gateway/assets/icon-256x256.png?rev=2142799)
 * [Payment Plugins Braintree For WooCommerce](https://wordpress.org/plugins/woo-payment-gateway/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-payment-gateway/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-payment-gateway/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-payment-gateway/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-payment-gateway/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-payment-gateway/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/js-e/#post-16115390)
 * Status: resolved