• Resolved jordanwebdev

    (@jordanwebdev)


    When I have PayPal Checkout enabled as a payment option, I get the following JS error on my customized single product’s page console:

    TypeError: form.get(…) is undefined wc-gateway-ppec-generate-cart.js:46:23

    I think the reason is because I am using a custom single-product template, which does not include the paypal checkout form on it, and I see in the JS code, it is searching for a form that does not exist. I could just disable paypal checkout, but the problem is that I like to have it on the review order screen, just not the single product screen. Is there any way to prevent the JS from checking the single-product screen, without modifying the plugin’s JS file?

    Right now I have to disable PayPal Checkout, or else JS optimization through Autoptimize fails, due to this issue.

    I feel like this plugin should have a basic if check before executing this code (i.e., if form.length > 0 …)

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘form.get() js error when PayPal Checkout is enabled’ is closed to new replies.