1. Documentation /
  2. Stripe WooCommerce Extension /
  3. Troubleshooting the Stripe WooCommerce Extension /
  4. Why do some customers get an error to enable JavaScript?

Why do some customers get an error to enable JavaScript?

JavaScript (also called JS) is a coding language that allows content to be dynamically updated and rendered on a web page. It’s a vital part of the look and experience of a WooCommerce site.

The Stripe WooCommerce Extension leverages JavaScript to display important aspects of the payment process for customers — like displaying payment fields. If a customer sees an error requesting that they enable JavaScript, then it’s likely either a result of:

  1. JavaScript errors on the checkout page.
  2. JavaScript files fail to load on the checkout page.

What can cause issues when loading JavaScript files?

↑ Back to top

The Stripe WooCommerce Extension requires JavaScript files to function. If these are not loaded properly, it will produce errors. The most common reasons for JavaScript files not loading are:

  1. The active theme is missing wp_head() or wp_footer() calls.
  2. The active theme is using old, overridden template files.
    • You can read more about fixing outdated templates here.
  3. The active theme is loading headers and/or footers in a non-standard way.
    • WooCommerce uses get_header()’s get_header action to initialize the checkout and load scripts. If you are not using get_header(), you either:
      • Need to do so.
      • Need to trigger the get_header action manually using do_action( ‘get_header' ); in your custom header loader.
  4. An optimization plugin is preventing the JavaScript files from loading properly.

How can I test what is preventing the JavaScript files from loading?

↑ Back to top

If you’d like to determine what is causing the JavaScript files to not load properly on your site, you will want to perform a conflict test. You can read more about plugin and theme conflicts in our Self-Service Guide.