- Handle Custom Stripe Webhook Events
- suredonation_export_secret_option_keys Filter Hook
- suredonation_import_batch_complete Action Hook
- suredonation_import_complete Action Hook
- suredonation_import_donation_inserted Action Hook
- suredonation_import_donor_inserted Action Hook
- suredonation_import_session_created Action Hook
- suredonation_import_givewp_batch_complete Action Hook
- suredonation_import_givewp_session_created Action Hook
- suredonation_privacy_data_exported Action Hook
- Validate Field Filter Hook
- Validatable Blocks Filter Hook
- Update donation data, Filter Hook
- OttoKit Integration: suredonation_suretriggers_integration_data_filter Filter Hook
- suredonation_show_setup_gateway_notice Filter Hook
- suredonation_show_review_notice_gateway Filter Hook
- suredonation_show_review_notice_donation Filter Hook
- suredonation_registered_payment_methods Filter Hook
- suredonation_register_additional_blocks Filter Hook
- suredonation_receipt_html Filter Hook
- Validatable Blocks Filter Hook
- Update donation data, Filter Hook
- OttoKit Integration: suredonation_suretriggers_integration_data_filter Filter Hook
- suredonation_show_setup_gateway_notice Filter Hook
- suredonation_show_review_notice_gateway Filter Hook
- suredonation_show_review_notice_donation Filter Hook
- suredonation_registered_payment_methods Filter Hook
- suredonation_register_additional_blocks Filter Hook
- suredonation_receipt_html Filter Hook
- suredonation_phone_geo_enabled Filter Hook
Ensure Secure Donations by Excluding from Caching Plugins
Caching plugins improve your website’s performance by serving static versions of your pages. However, donation forms require dynamic content, such as security tokens and payment scripts, that must be generated each time a visitor loads the page.
If a donation page is served from cache, visitors may experience errors when submitting donations. To prevent this, exclude all SureDonation pages that contain donation forms from your caching plugin.
Why Exclude SureDonation Pages from Caching?
SureDonation uses dynamic security features to protect donation submissions. When a cached version of a donation page is served, these security elements may become outdated.
This can lead to issues such as:
- Security check failed error when submitting a donation.
- Donation forms failing to submit.
- Donations not reaching the payment gateway.
- Stripe or PayPal payment fields not loading correctly.
- Donation amounts not updating properly.
- Legitimate donations being marked as spam when Honeypot protection is enabled.
For the best experience, donation pages should always bypass full-page caching.
Which Pages Should Be Excluded?
Exclude every page that contains a SureDonation form, including:
- Pages using the SureDonation Form block.
- Pages using the [suredonation_form] shortcode.
- Individual campaign pages.
- Any landing page that contains a donation form.
Supported Caching Plugins
SureDonation works with all popular caching plugins. If you use one of the following, make sure your donation pages are excluded from caching.
- WP Rocket
- LiteSpeed Cache
- W3 Total Cache
- WP Super Cache
- SiteGround Optimizer
- LWS Optimize
- Hummingbird
- Swift Performance
- Any other page caching solution
Step 1: Identify Your Caching Plugin
In your WordPress dashboard:
- Go to Plugins → Installed Plugins.
- Look for any active caching or performance optimization plugin.
Step 2: Exclude Donation Pages from Cache
Open the settings for your caching plugin and add every donation page URL to its cache exclusion list.
For example:
- /donate/
- /campaigns/education-support/
- /campaigns/help-children/
After saving the changes, clear or purge your website cache.
Cache Exclusion Settings for Popular Plugins
WP Rocket
- Go to Settings → WP Rocket.
- Open the Advanced Rules tab.
- Under Never Cache URLs, add your donation page URLs.
- Save your changes.
- Clear the cache.
LiteSpeed Cache
- Go to LiteSpeed Cache → Cache → Excludes.
- Add your donation page URLs under Do Not Cache URIs.
- Save the settings.
- Purge all caches.
LWS Optimize
- Navigate to LWS Optimize → Cache Settings.
- Locate Exclude URLs from Cache.
- Add your donation page URLs.
- Save the changes.
- Purge the cache.
W3 Total Cache and WP Super Cache
Open the page cache settings and locate the option similar to:
- Never Cache Pages
- Excluded URLs
- Do Not Cache
Add all donation and campaign page URLs, then save your settings and clear the cache.
SiteGround Optimizer, Hummingbird, and Other Plugins
Most caching plugins include an option named:
- Exclude URLs
- Never Cache URLs
- Do Not Cache Pages
Add every page that contains a SureDonation form, save the settings, and purge the cache.
Excluding SureDonation Security Nonces
SureDonation protects donation submissions using a security nonce that is generated each time the donation form loads.
Normally, excluding your donation pages from page caching is enough.
If your caching or optimization plugin provides an option to cache nonces, exclude the following nonces so they are always generated dynamically:
- suredonation_donation_form
- wp_rest
This helps prevent expired security tokens from being served to visitors.
Step 3: Test Your Donation Form
After updating your cache settings:
- Clear your website cache.
- Reload the donation page.
- Verify that the donation form loads correctly.
- Complete a test donation.
- If Honeypot protection is enabled, confirm that genuine donations are accepted successfully.
Troubleshooting
If your donation form is still not working correctly:
- Clear your browser cache.
- Purge your website cache again.
- Verify that every donation page has been excluded from caching.
- Temporarily disable your caching plugin to confirm whether caching is causing the issue.
- Check that your payment gateway loads correctly on the donation page.
If the issue persists, contact the SureDonation support team for further assistance.
We don't respond to the article feedback, we use it to improve our support content.