• Resolved gferguson78

    (@gferguson78)


    Hi there,

    I’m seeing the following error appear on all products which are out of stock and unavailable for purchase –

    Uncaught TypeError: Cannot read property ‘checkValidity’ of undefined
    at validate_form (wc-gateway-ppec-generate-cart.js?ver=1.6.10:46)
    at wc-gateway-ppec-generate-cart.js?ver=1.6.10:70
    at wc-gateway-ppec-generate-cart.js?ver=1.6.10:126

    It seems that the plugin is looking for the add to cart form but can’t find it (due to the product being unavailable for purchase) – there is no condition setup within the plugin to check if the product is in stock or not. Can this be added in a future release so that the error doesn’t keep appearing?

    Many thanks,
    Gordon

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Praveen a11n

    (@spraveenitpro)

    Automattic Happiness Engineer

    Hi @gferguson78,

    I just had this tested with 2 situations,

    Out of stock but Back Order allowed:

    I was able to pay with PayPal checkout with out any issue.

    Out of stock and Back order not allowed:

    In this case the customer will not be able to add the product to cart in the first place as they will see:

    Can you please test using the latest default theme twenty nineteen to see if you are still getting the same issue while deactivating all plugins except for WooCommerce and paypal checkout?

    Cheers!

    Thread Starter gferguson78

    (@gferguson78)

    Thanks for your reply. I have tested this on 2019 theme with all plugins disabled apart from WooCommerce and PayPal. It works exactly as you describe above but the same error persists when I check it in developer tools – please see the screenshot.

    It doesn’t seem to affect the operation of the plugin but the error is there.

    Many thanks,
    Gordon

    Thread Starter gferguson78

    (@gferguson78)

    Apologies – the image can be viewed here –

    https://ibb.co/SnW1PtT

    Thanks,
    Gordon

    Thanks Gordon.

    I’ve tested WooCommerce PayPal Checkout Gateway 1.6.11 and WooCommerce 3.6.1 and confirmed this issue.

    I’ve reported this issue here https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout/issues/558

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Uncaught TypeError ‘checkValidity’ when product is out of stock’ is closed to new replies.