Title: JS Error on Checkout
Last modified: August 23, 2019

---

# JS Error on Checkout

 *  Resolved [Chris Raymond](https://wordpress.org/support/users/chrisraymond/)
 * (@chrisraymond)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/js-error-on-checkout/)
 * Hello,
    Recently started having issues with the checkout page. My team reviewed
   and appears to be JS issues(Uncaught ReferenceError: WC_Square_Payment_Form_Handler
   is not defined) which means this class(WC_Square_Payment_Form_Handler) is not
   available in DOM. Not sure how to resolve as the JS file in in min form. Any 
   ideas how to fix? Thanks in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjs-error-on-checkout%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Thomas Shellberg](https://wordpress.org/support/users/shellbeezy/)
 * (@shellbeezy)
 * Automattic Happiness Engineer
 * [6 years, 8 months ago](https://wordpress.org/support/topic/js-error-on-checkout/#post-11861180)
 * Hey [@chrisraymond](https://wordpress.org/support/users/chrisraymond/),
 * I can see the error in the console on the site but I’m not having that problem
   on my test site. Are you running version 2.0.3?
 * I’d try deleting and reinstalling the plugin and retesting.
 *  Thread Starter [Chris Raymond](https://wordpress.org/support/users/chrisraymond/)
 * (@chrisraymond)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/js-error-on-checkout/#post-11861208)
 * Hi [@shellbeezy](https://wordpress.org/support/users/shellbeezy/)
    We are indeed
   running version 2.0.3 of this plugin. Also using the latest version of Woocommerce,
   and WordPress as well.
 *  Thread Starter [Chris Raymond](https://wordpress.org/support/users/chrisraymond/)
 * (@chrisraymond)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/js-error-on-checkout/#post-11861233)
 * Also, tried deleting and reinstalling but issue persists.
 *  [Mike W](https://wordpress.org/support/users/nixiack8/)
 * (@nixiack8)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/js-error-on-checkout/#post-11862275)
 * Hi [@chrisraymond](https://wordpress.org/support/users/chrisraymond/),
 * Thank you for the additional information! Testing this I too see [the error](https://cld.wthms.co/ffSbQM)
   on your site.
 * Checking through my test site, I see some hidden fields but [no errors](https://cld.wthms.co/PIrFxB).
   Due to this, have you switched out your theme to something like Storefront or
   Twenty Seventeen temporarily to see if the issue persists? There may be a javascript
   conflict there that is not happening on our side, which is why we are not able
   to replicate the issue.
 * We do recommend a staging site for these tests so that your Live site is unaffected.
   You can reach out to your Host if you need to have a staging site set up, as 
   they usually can assist you with this. Please let us know the results!
 *  Thread Starter [Chris Raymond](https://wordpress.org/support/users/chrisraymond/)
 * (@chrisraymond)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/js-error-on-checkout/#post-11868612)
 * Hi [@nixiack8](https://wordpress.org/support/users/nixiack8/),
    Thank you for
   the recommendation. What we found was custom code in the Functions.php file “
   defer js” that caused the issue. Once we removed that, all worked as expected.
   Thanks.
 *  [jahidulislam](https://wordpress.org/support/users/jahidulislam/)
 * (@jahidulislam)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/js-error-on-checkout/#post-12259263)
 * [@nixiack8](https://wordpress.org/support/users/nixiack8/) [@chrisraymond](https://wordpress.org/support/users/chrisraymond/)
   Thanks for the help and Post. i also had same problem, it was one of a plugin
   that having issue. i just deactivated the plugin and worked smoothly.
 *  Anonymous User 18019806
 * (@anonymized-18019806)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/js-error-on-checkout/#post-12988089)
 * I woke up to this issue on a client site this AM. I found the solution to the
   issue to be similar to the [@chrisraymond](https://wordpress.org/support/users/chrisraymond/)
   found.
 * For me, the issue was the SG Optimizer plugin. I had their “Combine JS Files”
   feature turned on which was causing this problem. Once I turned that off, the
   fields loaded just as they should.
 * Figured I’d add this as this is the top-ranking response for this error on google
   right now.

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

The topic ‘JS Error on Checkout’ is closed to new replies.

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

 * 7 replies
 * 2 participants
 * Last reply from: Anonymous User 18019806
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/js-error-on-checkout/#post-12988089)
 * Status: resolved