Reference Error: Stripe is not defined

[ad_1]

Hi @armedandgorgeous

I see that js.stripe.com is loading, but it appears to be a timing issue where the dependent scripts like wc-stripe.js which is from the Stripe plugin, are loading first.

The js.stripe.com script is a dependency, meaning it should always load first. But that is not happening on your product page.

On your page, the js.stripe.com script is loaded via the following script tag:

<script type="text/javascript" async="async" src="https://js.stripe.com/v3/?ver=3.3.31" id="wc-stripe-external-js"></script>

That “async” attribute is not part of standard WordPress, so you have a plugin that’s adding that and forcing the Stripe JS script to load asynchronously. That’s what’s causing the error message you see because the dependency scripts are loading first.

Kind Regards,

Brilliant I’ve got it working thank you!

@armedandgorgeous thanks for confirming.

We always appreciate some love on our review page.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer