Charitable Documentation

Learn how to make the most of Charitable with clear, step-by-step instructions.

Donation Form Errors Detected: Payment Scripts Blocked by Caching or Optimization

If you see a dashboard notice titled “Donation form errors detected,” this guide explains what it means and how to resolve it.

The important thing to know first is that this single notice can point to two very different situations. One of them can stop real donors from paying by card and needs your attention. The other is Charitable noticing automated crawlers, and it is harmless. Before you change any settings, identify which one you are dealing with.

What This Notice Means

To take a card payment, your donation form relies on a small script loaded directly from your payment provider in the visitor’s browser. Stripe loads js.stripe.com, PayPal loads the PayPal SDK, and Square loads the Square Web SDK. That script is what draws the secure card fields and sends the payment to the provider. If it is missing, the card fields cannot appear and the donation cannot be completed.

Charitable watches each donation page as it loads. If the required payment script was not present, it records the event and, if enough are recorded, raises this notice. The notice also lists any caching or optimization plugins it detected on your site, which is your first clue to what happened.

There are two common reasons the script goes missing, and they call for very different responses.

  • A caching or optimization plugin cached, combined, minified, or delayed the page’s JavaScript so the payment script never ran. This can turn away real donors and needs fixing.
  • Search engine and social media crawlers visited your donation pages. They read the page but do not run payment scripts the way a real browser does, so the check records a miss even though no real donor was affected. This is harmless.

First, Identify the Cause

Charitable logs every recorded event so you can see exactly what happened. To view the log:

  1. Click Review the log on the notice, or go to Charitable > Tools > Logs in your WordPress admin. You can also see a summary under Charitable > Tools > System Info in the Form Errors section.
  2. Find the entries with the error code gateway_sdk_not_loaded. You can export the full log to a CSV file if you prefer to review it in a spreadsheet.
  3. For each entry, look at the visitor’s user agent (the browser that loaded the page).

The user agent tells you which path to follow:

  • A normal, current browser (Chrome, Safari, Firefox, or Edge on a phone or computer) means a real visitor may have been affected. Follow Cause 1.
  • A search engine or social crawler (for example bingbot, Googlebot, meta-externalagent from Facebook, or OAI-SearchBot from OpenAI) means an automated bot tripped the check, not a donor. Follow Cause 2.

If every entry is a crawler and your donations are otherwise coming through normally, you are almost certainly looking at the harmless case in Cause 2.

Cause 1: An Optimization Plugin Is Blocking the Payment Script

If your log shows normal browsers, the cause is almost always a caching or optimization plugin. Three features in particular can withhold the payment script from a donation page:

  • Full-page caching can serve a stored copy of the page that was built without the payment script.
  • Minify and combine JavaScript can break the order the payment script needs to load in.
  • Delay or defer JavaScript (sometimes called “load JavaScript on interaction”) holds scripts back until the visitor clicks or scrolls, so the payment script is not ready when the form needs it. This is the most common culprit.

The fix is to tell your optimization plugin to leave the donation pages and the payment scripts alone. Apply all three of these:

  1. Exclude your donation pages from full-page caching. Add the URLs of every page that contains a donation form (your campaign pages and donation pages) to the cache exclusion or bypass list. If your host or CDN also caches pages, exclude them there too.
  2. Exclude the payment scripts and Charitable’s scripts from minify and combine. Use the values listed below.
  3. Exclude the same scripts from delay or defer JavaScript. This is the step most often missed, and usually the one that fixes it.

In most optimization plugins you can paste the following into the relevant exclusion or “do not optimize” fields. You do not need to be exact, matching any part of the script address is enough:

js.stripe.com
www.paypal.com/sdk
paypalobjects.com
web.squarecdn.com
js.squareup.com
charitable
charitable-pro
CHARITABLE_VARS

After saving, clear your optimization plugin’s cache, then open a donation page in a private or incognito browser window and confirm the card fields appear and a test donation works.

Settings Location by Plugin

Where these options live depends on the plugin. The common ones are below. For WP Rocket and WP-Optimize, Charitable already applies these exclusions for you, so you normally do not need to change anything there.

WP Fastest Cache

On the Settings tab, review Minify JS, Combine JS, and Render Blocking JS, and turn them off for testing if needed. If you use the premium Delay JS feature, add the values above to its exclusion list. Under Exclude > Exclude Pages, add your campaign and donation page URLs so they are never cached, and under Exclude > Exclude JS, add the values above. Clear the cache from the Delete Cache tab afterwards.

WP Rocket

Charitable automatically excludes the payment scripts and its own files from WP Rocket’s minify, combine, and Delay JavaScript Execution, so this usually needs no action. If you still see an issue, confirm nothing is manually re-adding the Charitable or payment scripts, and under Advanced Rules > Never Cache (URLs) add your donation page URLs.

LiteSpeed Cache

Under Page Optimization > JS Settings, add the values above to JS Excludes and, if you use it, to Guest Mode JS Excludes and the Localization or defer exclusions. Under Cache > Excludes, add your donation page URLs to Do Not Cache URIs. Purge all caches afterwards.

WP-Optimize

Charitable automatically adds the payment scripts and its own files to WP-Optimize’s minify and combine exclusions, so this usually needs no action. If needed, you can confirm them under WP-Optimize > Minify > JavaScript in the exclusions list, and exclude donation pages from caching under WP-Optimize > Cache > Advanced settings.

Autoptimize

Under Settings > Autoptimize > JavaScript Options, add the values above to Exclude scripts from Autoptimize. If you use the “Enable 100% JavaScript optimization” or any defer option, make sure these exclusions still apply. Autoptimize does not cache pages itself, so pair it with your page-cache plugin’s exclusions.

W3 Total Cache

Under Performance > Minify, add the values above to the JS Never minify the following JS files list, and under Performance > Page Cache > Advanced add your donation page URLs to Never cache the following pages.

FlyingPress

Under Settings > JavaScript, add the values above to the Exclude from Lazy Load and Exclude from Delay lists. Under Settings > Cache, add your donation page URLs to the exclusions. Purge the cache afterwards.

WP Super Cache

WP Super Cache does not minify or delay JavaScript, so the fix here is caching only. Under Settings > WP Super Cache > Advanced, add your campaign and donation page URLs to Accepted Filenames & Rejected URIs so they are not served from the cache.

Cache Enabler

Cache Enabler is a page cache only. Under Settings > Cache Enabler, add your donation page URLs to the Cache Exclusions (post IDs or page paths) so they are always served fresh.

Other tools follow the same idea. In SiteGround Optimizer, turn off or exclude the Charitable and payment scripts under the JavaScript options and avoid combining them. In Cloudflare, disable Rocket Loader for your donation pages (Cloudflare’s Rocket Loader defers JavaScript and can hold back the payment script), and if you use Automatic Platform Optimization (APO), exclude the donation pages.

Cause 2: Search Engine and Social Crawlers

If your log entries are all crawlers, the news is good. Search engines and social platforms fetch your donation pages to index them or build link previews, but they do not run the payment script the way a real browser does. The check sees the script missing and records it, even though no genuine donor was affected and nothing on your site is broken.

A steady trickle of crawler visits is normal for any public donation page, and it is enough to keep the notice showing. Your real donations are not affected, and no donor is being turned away.

You do not need to change any caching settings for this. The best step is to update Charitable, as described next. Newer versions recognise crawlers and stop counting them, so these entries no longer trigger the notice.

Update to the Latest Version

Whichever cause applies to you, updating Charitable to the latest version is worthwhile. Go to Plugins > Installed Plugins and update Charitable. Recent versions:

  • Load the Stripe script across the site, so it is far less likely to be stripped from a cached donation page.
  • Automatically exclude the payment scripts from popular optimization plugins.
  • Recognise search engine and social crawlers, so they no longer trigger false alarms.
  • Point this troubleshooting guide at the correct address (older versions linked to a page that no longer exists).

Dismissing the Notice

The notice can remain for a few days even after the cause is addressed. It clears on its own once there are no new recorded events for 24 hours, and you can dismiss it manually from the dashboard at any time.

Advanced: What Charitable Excludes Automatically

For WP Rocket and WP-Optimize, Charitable automatically excludes the payment SDKs and its own scripts from minify, combine, and delay-JavaScript, so you normally do not need to configure anything there. For other tools, exclude the following by hand.

  • Payment provider script hosts: js.stripe.com, www.paypal.com/sdk, paypalobjects.com, web.squarecdn.com (and sandbox.web.squarecdn.com in test mode), js.squareup.com.
  • Charitable’s own scripts: any file under /wp-content/plugins/charitable/ or /wp-content/plugins/charitable-pro/, and the script handles charitable-script, charitable-stripe, charitable-paypal, charitable-square, and charitable-universal.
  • Inline configuration variables: CHARITABLE_VARS, CHARITABLE_STRIPE_VARS, CHARITABLE_PAYPAL_VARS, CHARITABLE_SQUARE_VARS.

Still Need Help

If your log shows normal browsers and donations still fail after excluding the scripts, contact Charitable support. It helps us if you include the error code from your log (gateway_sdk_not_loaded), the payment gateway you use, and the caching or optimization plugins listed in the notice. That tells us immediately where to look.

Still have questions? We’re here to help!

Last Modified:

What's New In Charitable

View The Latest Updates
🔔 Subscribe to get our latest updates
📧 Subscribe to Emails

Email Subscription

Join our Newsletter

We won’t spam you. We only send an email when we think it will genuinely help you. Unsubscribe at any time!

Improvement Payments

💸 Introducing Tiered Rates for Fee Relief: Match the Ask to the Gift!

Fee Relief asks your donors one short question at checkout: would you like to cover the processing fee on this gift? Until now that question used a single rate for every donation on a gateway, so a $10 gift and a $500 gift were asked for the same percentage. Fee Relief 1.3.0 lets you set as many donation bands as you like, each carrying its own rate. Why this is important:

  • 🪙 Gentler on small gifts: A fixed transaction cost is a far bigger share of a $10 donation than a $500 one, so bands let you ask for less at the bottom.
  • 🎚️ As many bands as you need: Each band carries its own percentage and its own fixed amount, and the top band runs on with no upper limit.
  • 🛑 An optional ceiling: A Maximum fee field stops any donor being asked for more than a number you choose, however large the gift.
  • 🔌 Set per payment gateway: Stripe can run on four bands while Windcave and Payfast stay on a single rate, because bands belong to a gateway and not to your whole site.
  • 🛡️ Nothing changes until you say so: Your current rates stay exactly as they are until you switch Use Tiered Rates on under Charitable » Settings » Advanced » Fee Relief.

Check out our announcement here.

Donations Improvement

📊 Your Pro Dashboard Can Now Compare, Export, and Score!

Most fundraising dashboards only tell you how much you have raised. Charitable Pro 1.8.19 rebuilds the dashboard and the Reports Overview around the harder questions: whether anything is broken, whether this period beat the last one, and which single change would make the most difference today. Why this is important:

  • 📈 Every figure has a trend: Pick a period and the tiles and the chart move together, with each total shown against the previous period.
  • 🗓️ Charts that stay readable: Short ranges group donations day by day, while longer ranges group by week or month, so a full year reads as a curve instead of a flat line.
  • 🔀 Compare any 2 periods: Not just consecutive ones, so you can ask how this December did against last December. That matters because fundraising is seasonal.
  • 📤 Export the whole summary: Send the full overview out as CSV or PDF, ready for a board pack or a funder report.
  • 🎯 Score your setup for free: Have your fundraising setup scored, so the one change worth making next is the one you can see.

Check out our announcement here.

Feature New

🎟️ Introducing Charitable Events: Sell Tickets Inside Your Campaigns!

Most nonprofits sell event tickets in one tool and collect donations in another, which leaves two sets of reports and a manual match at the end of the year. Charitable Events brings both together, selling tickets through the same donation forms and payment gateways you already run in Charitable. Why this is important:

  • 🎟️ Every ticket is a donation: Ticket sales run through the gateway you already use and count toward the campaign goal, with everything managed under Charitable » Events.
  • 📱 QR check-in from any phone: Each attendee gets their own QR code on the receipt, and volunteers scan at the door through a check-in link that needs no WordPress account.
  • 🧾 Receipts ready for tax time: Give each ticket type a fair market value, and Charitable puts the correct tax-deductible amount on every donor receipt.
  • 📋 Attendee details at checkout: Ask every guest for a meal choice, shirt size, or access needs, with a separate attendee record created for each ticket.
  • 🗓️ Blocks and calendars included: Three editor blocks plus Sugar Calendar and The Events Calendar support put your events where supporters already look.

Check out our announcement here.

ai New

🚀 Unleash AI Power in Charitable!

Your AI assistant can now build, edit, and manage your Charitable fundraising campaigns directly — just by asking. With Charitable Pro adding write support for the WordPress Abilities API, tools like ChatGPT, Claude, and Cursor can handle full administrative actions safely through MCP. Why this is important:

  • 🤖 Campaign creation in plain language: Prompt your assistant with a goal like “Set up a fundraiser for the shelter with a $5,000 goal”, and it builds a real draft campaign complete with suggested donation tiers.
  • 🎨 Instant donation form tweaks: Add custom fields, change button colors, or reorder elements without diving into form settings.
  • 📝 Offline gift logging: Tell your assistant about cash or check gifts, and it will match donor emails and record transactions into your history.
  • 🛡️ Safety and control by default: Write access stays strictly off until turned on in Charitable » Tools » AI MCP, keeping read-only reporting safe by default.
  • 📜 Full audit logging: Every change made by an AI assistant is tracked under Charitable » Tools » Logs, so you always know who (or what) updated your site.

Check out our announcement here.

Improvement Payments

💰 Accept Recurring Donations with Windcave and Charitable

A donor sets their gift up once on Windcave’s secure payment page, and Charitable bills every renewal after that on schedule. Why this is important:

🏦 Organizations banked in New Zealand or Australia: monthly giving on the gateway your bank already set you up with, with no second processor to onboard.
⛪ Churches taking regular tithes and offerings: congregants set their own schedule once, which is the simplest way to launch recurring church giving without a separate platform.
🌏 Groups with donors in several currencies: Windcave handles more than 20, so a supporter can give in the currency they actually hold.
📅 Operating funds rather than one-time campaigns: switch on Recurring Only mode and the one-off option disappears, so every gift to that campaign is a subscription.
🧾 Teams with no developer on staff: 3 sets of credentials pasted into a settings page, and no code anywhere.

Check out our announcement here.