WP Simple Pay Documentation

Documentation, Reference Materials, and Tutorials for WP Simple Pay

How to Configure WP Rocket Settings

Reading time: 3 minutes | Difficulty: Beginner

Overview

Are your payment forms not working correctly for logged out users, or only some of the time, with WP Rocket active? Follow the steps below to make sure WP Simple Pay works as expected alongside WP Rocket.

Since WP Simple Pay 4.17.5, payment forms load their data from your site as the page opens, so pages with payment forms can be cached. You only need to exclude your payment confirmation pages, plus WP Simple Pay’s scripts if you use WP Rocket’s JavaScript optimizations.

Prerequisites

  • WP Simple Pay 4.17.5 or later. On earlier versions, also add your payment form pages to Never Cache URL(s).
  • The WP Rocket plugin installed and active

Cache Settings

Add Payment Confirmation Pages to Never Cache

Under the Advanced Rules menu option, add the URLs of your payment confirmation pages to Never Cache URL(s).

wp simple pay wp rocket settings never cache

JavaScript Settings

Issue 1: Combine JavaScript and Minify JavaScript

In some cases, WP Simple Pay users run into issues because of the Combine JavaScript files option (found under the File Optimization tab).

wp simple pay wp rocket settings javascript

If forms are not working as expected, try one of the following:

  • Exclude the page or post from JavaScript optimization by unselecting the Minify/combine JS option in the page or post editor, then clear the cache before testing again, OR
  • In WP Rocket, disable the Combine JavaScript files option, save settings, then clear the cache before testing again.

Issue 2: Load JavaScript Deferred

Loading JavaScript deferred can cause issues with WP Simple Pay payment forms. Add the following to Excluded JavaScript Files to make sure payment forms work as expected:

/wp-content/plugins/wp-simple-pay-pro-3/(.*).js
js.stripe.com/v3/

If WP Simple Pay is installed in a different folder, replace wp-simple-pay-pro-3 with that folder’s name.

wp simple pay wp rocket settings load javascript deferred

Clear All Caches and Optimizations

After making these changes, and after updating WP Simple Pay to 4.17.5, clear all caches and optimizations, reload the payment pages, and try the payment form again.

What’s Next?

Still have questions? We're here to help!

Last Modified:

Start Accepting Payments Today

Start accepting one-time and recurring payments or donations on your WordPress website.