• Resolved NCDiesel

    (@ncdiesel)


    I use Woocommerce and the Payments plugin for stripe. Like many, many other sites my users get the “Uncaught ReferenceError: Stripe is not defined” error pop-up whenever someone clicks on a product. Disabling Apple Pay works; as has been the case for many others. What is different is I do not, and have never, used any kind of caching plugin. As I understand it, this is a dependency/load order issue usually caused by these types of plugins. Since I don’t use them, I guess I need help with one of the following:

    Is there another fix that is working for other folks in my similar circumstances so I can re-enable Apple Pay?
    How might I identify another plugin that is possibly caching “under the covers”?

    Thanks in advance!

    PS. This only started happening recently. We hosted an event in September that we sold tickets too and this never occurred then.

    NCDiesel

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

    (@mrclayton)

    Hi @ncdiesel,

    Do you have any minification plugins enabled? These plugins combine Javascript files into a bundle and that can mess up the load order.

    Do you have a website url you can share where this error is present? That could provide some insight into what’s causing the error.

    Does your theme do anything special on the product page like load content dynamically via an AJAX request? Some themes defer loading of parts of the product page and that can cause issues.

    Kind Regards,

    Thread Starter NCDiesel

    (@ncdiesel)

    Thanks for the reply. No minification plugins – at least no plugins who purpose it is to minimize javascript. Plus, the sources and network tab show no evidence of minimization. Below I see reference to jquery.min but that’s not the same thing as javascript minimization I dont think. I re-enabled Apple pay so you can see the error if you go to:

    https://ritadeealpacas.com/farm-store/

    and click on any product. I use the Rambo pro theme and the error stack does mention AJAX(below). I did try disabling the only plugin I’ve added in the last 6 months but that does not seem to be a contributor since the problem still existed without change.

    Thanks for your response!!

    ReferenceError: Stripe is not defined
        at <anonymous>:1:45681
        at <anonymous>:1:45963
        at b (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2)
        at Function.globalEval (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2)
        at Object.dataFilter (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2)
        at /wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2
        at l (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2)
        at XMLHttpRequest.<anonymous> (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2)
        at Object.send (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2)
        at Function.ajax (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2)
    • This reply was modified 3 years, 4 months ago by NCDiesel.
    Thread Starter NCDiesel

    (@ncdiesel)

    Hey – noodlin` around just now and realized if I right click the product and choose “Open in a new tab” I don’t get the error. Normally clicking on the product opens a dialog/modal.

    Assuming this is a clue? Maybe?

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @ncdiesel,

    So here is what I think the problem is. When a product image is clicked, rather than redirect to the product page, your theme fetches the product page html using a jQuery AJAX request.

    JQuery is synchronously loading each JS file individually and the wc-stripe.min.js file that has js.stripe.com as a dependency is loading first. That is because jQuery skips evaluating external scripts, which js.stripe.com is since it’s on a different domain. The reason this is happening is your product page content is being inserted inline into the fancybox display.

    I am not sure you will be able to get around that error since that’s how your nextgen-gallery plugin is coded.

    Why don’t you reach out to use via the Help button and we can go over some possible ideas on how to resolve this error.

    Kind regards,

    Thread Starter NCDiesel

    (@ncdiesel)

    OK – I feel REAL stupid. Where is the “Help Button”? Honest, I really did look all around, including the main plugin site, your profile, this support forum, etc. I am either real blind or I need to be logged in a certain way or be some certain type of user to see it.

    Sorry for my inane question but I really can’t find it.

    Thanks,

    NCDiesel

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @ncdiesel

    The help button is located on any settings page of the stripe plugin. So in your WordPress Admin dashboard navigate to any plugin settings page and you will see the help button.

    Kind regards

    Thread Starter NCDiesel

    (@ncdiesel)

    Ha ha ha! I was looking in www.remarpro.com and this forum. Didn’t even consider the plugin itself. Help button message has been sent.

    Plugin Author Payment Plugins

    (@mrclayton)

    Setting this thread to resolved since this issue is related to another plugin. We are assisting the merchant via our support channels.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Yet another stripe reference error’ is closed to new replies.