Title: JS issues when enabling Google Pay
Last modified: March 10, 2021

---

# JS issues when enabling Google Pay

 *  Resolved [johnwilson8642](https://wordpress.org/support/users/johnwilson8642/)
 * (@johnwilson8642)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/js-issues-when-enabling-google-pay/)
 * When I enable Google Pay, I get an error on the product page.
 * On chrome I get this message ‘Cannot read property ‘indexOf’ of undefined’ and
   on safari this one ‘undefined is not an object (evaluating ‘e.indexOf’)’
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjs-issues-when-enabling-google-pay%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/js-issues-when-enabling-google-pay/#post-14158562)
 * Hi [@johnwilson8642](https://wordpress.org/support/users/johnwilson8642/),
 * Are you able to enable GPay on your product page so I can take a look?
 * Kind Regards,
 *  Thread Starter [johnwilson8642](https://wordpress.org/support/users/johnwilson8642/)
 * (@johnwilson8642)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/js-issues-when-enabling-google-pay/#post-14160557)
 * Hi [@mrclayton](https://wordpress.org/support/users/mrclayton/)
 * Sure. You can view the product on this page [https://www.tickingoffbreastcancer.com/product/test/](https://www.tickingoffbreastcancer.com/product/test/)
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/js-issues-when-enabling-google-pay/#post-14162424)
 * Hi [@johnwilson8642](https://wordpress.org/support/users/johnwilson8642/),
 * Thanks for enabling GPay so I could see the error. The issue is that although
   this is a product page and only the `googlepay-product.js` file should loaded,
   both `googlepay-product.js and googlepay-checkout.js` are loading. `googlepay-
   checkout.js` should only load on the checkout page but something on your site
   is causing it to load.
 * Did you use a builder plugin such as Elementor to create your product page?
 * Kind Regards,
 *  Thread Starter [johnwilson8642](https://wordpress.org/support/users/johnwilson8642/)
 * (@johnwilson8642)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/js-issues-when-enabling-google-pay/#post-14164227)
 * Hi [@mrclayton](https://wordpress.org/support/users/mrclayton/)
 * Thank you for looking into the issue, I built that product page using the Divi
   builder.
    I have just created a new product without the builder ([https://www.tickingoffbreastcancer.com/product/demo-product/](https://www.tickingoffbreastcancer.com/product/demo-product/))
   however this has not resolved the issue. I am using the Kale theme.
 * Thanks a lot.
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/js-issues-when-enabling-google-pay/#post-14164233)
 * Hi [@johnwilson8642](https://wordpress.org/support/users/johnwilson8642/)
 * Something on your side is loading the checkout page script which is why you are
   seeing that error.
 * Try a basic WordPress theme like 2020 and see if you still get the error. You
   will need to track down if it is a theme, a plug-in, or your cache settings that
   are the culprit.
 * Kind Regards,
 *  Thread Starter [johnwilson8642](https://wordpress.org/support/users/johnwilson8642/)
 * (@johnwilson8642)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/js-issues-when-enabling-google-pay/#post-14167702)
 * Hi [@mrclayton](https://wordpress.org/support/users/mrclayton/)
 * This plugin: [https://en-gb.wordpress.org/plugins/buy-now-woo/](https://en-gb.wordpress.org/plugins/buy-now-woo/)
   has been causing the issues, seeing that it hasn’t been updated for a while I
   have immediately removed it and replaced it with an alternative.
 * Thanks for your assistance.

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

The topic ‘JS issues when enabling Google Pay’ is closed to new replies.

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

 * 6 replies
 * 2 participants
 * Last reply from: [johnwilson8642](https://wordpress.org/support/users/johnwilson8642/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/js-issues-when-enabling-google-pay/#post-14167702)
 * Status: resolved