This post will help to troubleshoot a few common issues that can crop up at checkout when using Paid Memberships Pro with Stripe. Specifically, these troubleshooting and debugging tips will help if you receive one of the following errors at checkout:

  • There are JavaScript errors on the page. Please contact the webmaster.
  • Please complete all required fields. (Even though you did fill out all fields.)
  • Class 'Stripe\PaymentMethod' not found
Banner for General Troubleshooting Guide for Paid Memberships Pro

Why is this happening?

In almost all cases, what is happening is that the Stripe JavaScript code is unable to “talk” through the Stripe API to validate the user’s credit card and process the checkout.

The reason you sometimes get the “complete all required fields” error is that we weren’t able to catch the real error with the Stripe integration and so tried to submit the form without the updated credit card token that Paid Memberships Pro is expecting for Stripe checkouts. So to PMPro, it looks like some fields were left empty. But really JavaScript broke down and so those hidden fields were never updated.

In some other cases, another plugin is loading a different version of the Stripe API library before Paid Memberships Pro does. To avoid issues, PMPro will try to use the version of the Stripe API that is already loaded, but if that version doesn’t support a feature that PMPro is using, it will throw an error.

So, how can you fix this? Here are the things to look into to fix this issue.


Make sure that your payment settings are correct.

In particular, make sure that the “secret key” and “publishable key” don’t have any extra whitespace or strange characters in front or back. And make sure that the “gateway environment” is set to “Live/Production” unless you are using a Stripe test account.


Make sure that other plugins or themes are not causing JavaScript issues at checkout.

You can use the Chrome Debug Bar in Google Chrome to look for JavaScript errors. In Chrome, click Ctrl+Shift+J to bring up the JavaScript console. Errors will show up in red. The errors might give you a clue as to which plugin, theme, or file is causing the issue. There are similar tools for other browsers, including Firebug for Firefox and Developer Tools for IE.


Make sure all files are loading over HTTPS/SSL properly.

If your checkout page is loaded over HTTPS but tries to load a source file over HTTP, your browser may stop that file from loading. If it’s a JavaScript file that a plugin is expecting to be loaded, errors can occur which will keep Stripe from working. You can find these errors using the Chrome JavaScript console (Ctrl+Shift+J).

Enabling the “Extra HTTPS URL Filter” option on the payment settings will clean up some of these issues. If not, you can use the WordPress HTTPS plugin, just be sure to set the “Force SSL” setting in the PMPro payment settings to “No” and to check the “force SSL” option on the PMPro checkout and update billing pages so that plugin knows to control HTTPs for those pages.

If you are still having issues, you sometimes will have to edit the plugin or theme to use https:// in the URLs being loaded or wrap URLs using the site_url() function in WordPress.

Read more about SSL


Make sure you don’t have conflicting PMPro Add Ons or gists.

In particular the “complete all required fields” error can come up if say you are using the Capture Name and Address for Free Levels Add On, but have the “Show Billing Address” setting set to “No” for Stripe.

The setting will hide the address field, but the addon will still be expecting it. (Note: We did release version .3 of this addon to address a post PMPro v1.8 issue when using this addon with PayPal. Be sure to upgrade if you are using this addon.)

Another situation that can come up is if you have a field added using the Register Helper Add On that is added to the “after_password” area or another area that isn’t present when a logged in user is checking out. The field won’t be shown at checkout, but the code will still “require” it. You can make sure your required fields are added in a way that they will always be visible at checkout (use the checkout_boxes area) or add code like this to any field that shouldn’t be required for existing members logged in.


Make sure other plugins aren’t loading an older version of the Stripe API library.

If another plugin has loaded a version of the Stripe API library that doesn’t support the features PMPro is trying to use, you may get an error about a missing class or method and checkouts won’t work.

To debug this, you can update the loadStripeLibrary method of the Stripe Gateway Class in PMPro to output the location of the file that is already loading the Stripe library. Here is an alternative version of that method to drop in temporarily:

Once you know what other plugin is causing the conflict, you can disable it if it’s not needed or attempt to fix the conflict. If there is an update for the other plugin, that might fix the issue. If it still persists, you need to tell the other plugin to NOT load their version of the library on the PMPro checkout page. The code for this would be different for every plugin, but here is a gist that simply tells PMPro to load the Stripe API Library as early as possible. This will usually fix this issue. In some cases, it will also break the other plugin that is using Stripe and you will need to debug and fix that.


Make sure other plugins are not loading a version of Stripe’s JavaScript everywhere.

Paid Memberships Pro is very careful to only load the stripe.js file on frontend pages used by our plugin that require the code. There are other plugins you may be using that enqueue the Stripe JavaScript on all pages in your site. If another plugin has loaded a version of the Stripe JavaScript on the Membership Checkout page, you will get an error and checkout will not function.

To debug this, you can inspect the source of the Membership Checkout page (and Membership Billing page) to see if there are multiple stripe.js-like files in the page’s “Resources”.

Alternatively, here is a code recipe that will check all enqueued JS files on the PMPro pages and dequeue anything with the term “stripe” in the named file except the PMPro file. This is a nuclear approach to resolve the issue and only necessary in cases where the other plugin author would not update their code or you cannot resolve the issue any other way.

You can also target and remove Stripe code that is being globally loaded by a specific plugin. The recipe below targets and removes the Stripe files loaded by the Charitable WordPress plugin. If you are using another plugin and find that they are loading Stripe on all pages in your site, you’ll need to find out the function name in their plugin to properly update and use the recipe below.


Getting 500 error?

Stripe needs to be able to communicate with your server for everything to work correctly.

So if you’re getting a timeout or even a 500 error, it could be that you’re accidentally blocking Stripe’s webhook. So here’s what you can look at.

If a security plugin, make sure it’s not blocking any connections from Stripe. Check with your hosting provider to ensure they allow Stripe without blocking their IPs.

If you’re running a service like Cloudflare, you might need to add an allow rule to the firewall with Stripe’s IPs.

Need more help?

If you are still having trouble, we can help you in our member support forums. Sign up for a PMPro Membership, then post a new thread to the member forums stating the issue.

Was this article helpful?
YesNo