Skip to content

“Stripe.js not loaded” error message ​

This article explains why a WP Full Pay form shows the “Stripe.js not loaded” error and how to make Stripe's JavaScript library load correctly again.

In this article

What happened? ​

The payment form does not display its card fields, and an error banner with the message Stripe.js not loaded appears on the form. The error can show on every payment form on the site at once.

Why is it happening? ​

WP Full Pay loads Stripe's JavaScript library, Stripe.js, directly from Stripe at https://js.stripe.com/v3/. The form can only collect payment details when Stripe.js loads from that address. If the library does not load, WP Full Pay shows this error.

A common cause is a performance or optimization plugin that minifies or combines JavaScript. Some of these plugins process Stripe.js and serve a local copy from your own site instead of loading it from Stripe, which stops it from working.

Browser extensions that block scripts, such as ad blockers, can also stop Stripe.js from loading for an individual visitor.

How to solve? ​

Exclude Stripe.js from JavaScript optimization ​

Add the Stripe.js address to your optimization plugin's JavaScript exclusion list, so the plugin leaves it untouched. For example, in WP-Optimize:

  1. Go to WP-Optimize > Minify and open the JavaScript tab.

  2. Add the following value to the Exclude JavaScript from processing field:

    https://js.stripe.com/v3/
  3. Save the settings.

  4. Purge the minify cache and the page cache.

Other optimization plugins have a similar JavaScript exclusion setting. Add the same value there, then clear that plugin's generated files and page cache. For general cache-clearing steps, see how to clear the cache in WordPress.

Check the payment form ​

  1. Open the payment page in a private browser window with extensions disabled.
  2. Confirm the card fields display and the error banner is gone.
  3. Optionally, open your browser's developer tools, go to the Network tab, reload the page, and confirm Stripe.js is requested from js.stripe.com rather than from your own domain.
Was this helpful?