• Resolved mercurydan

    (@mercurydan)


    I have been using the Google Chrome to figure out what might be happening to randomly have people not able to use the checkout and this might be the problem. Do you know what is causing this? It seems like when the JS is minified by Siteground Optimizer.

    Browser errors were logged to the console
    siteground-optimizer-assets/wc-braintree-paypal-checkout.min.js

    Uncaught Error: [paypal-button] Context type iframe requires an element selector
    at Component.validateRenderContext (wc-braintree-paypal-checkout.min.js:516)
    at Component.getRenderContext (wc-braintree-paypal-checkout.min.js:516)
    at wc-braintree-paypal-checkout.min.js:516
    at Function.ZalgoPromise.try (wc-braintree-paypal-checkout.min.js:486)
    at Component.render (wc-braintree-paypal-checkout.min.js:516)
    at callOriginal (wc-braintree-paypal-checkout.min.js:922)
    at wc-braintree-paypal-checkout.min.js:784
    at Component.obj.<computed> [as render] (wc-braintree-paypal-checkout.min.js:922)
    at PayPal.<anonymous> (wc-braintree.min.js:1)
    at new Promise (<anonymous>)
    at PayPal.wc_braintree.PayPal.create_button (wc-braintree.min.js:1)
    at PayPal.create_button (wc-braintree-paypal-cart.min.js:8)
    at PayPal.wc_braintree.PayPal (wc-braintree.min.js:1)
    at new PayPal (wc-braintree-paypal-cart.min.js:1)
    at wc-braintree-paypal-cart.min.js:13
    at wc-braintree-paypal-cart.min.js:13

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @mercurydan,

    I believe that particular caching plugin caches all JS files files and prints them regardless of the page. Are you on the cart page or product page when you see that JS error?

    Kind Regards,

    Thread Starter mercurydan

    (@mercurydan)

    Mr, Clayton
    Yes this is the Checkout Page. I dont have a Cart Page, its a Cart drop down menu.

    Do you know how to fix this caching?
    Thanks

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @mercurydan,

    Can you share your website so I can see this error? That might help me see the exact cause. I am not familiar with your caching plugin but maybe there is an option to exclude certain JS scripts.

    Kind Regards,

    Thread Starter mercurydan

    (@mercurydan)

    Mr, Clayton,

    https://www.elektramagnesium.com.au/magnesium-shop/
    Its run by Siteground. Siteground is recommended as one of the best servers for wordpress. So I use their plugin for caching as well.
    Thanks

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @mercurydan,

    Sorry for the late reply. I took a look at your website and it looks like you’ve got a combined cart and checkout page. I would recommend that you disable the PayPal Setting’s option to display on the cart page.

    That should prevent the PayPal cart script from loading and causing that JS error.

    You don’t need the PayPal cart payment section enabled since you’re displaying the cart and checkout page together.

    Kind Regards,

    Thread Starter mercurydan

    (@mercurydan)

    Mr,Clayton
    Thank you that seems to have got rid of the error.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Google Developer shows Error in Checkout Page’ is closed to new replies.