payment-stripe
Reported issue on the Soundfreaq website online store (WordPress + WooCommerce):
Customer cannot make payment on the checkout page, when not logged in as a visitor.
I tried it on both mobile (android phone) and desktop (windows 11) with different browsers. As you can see the Credit/Debit Card window won't allow CC input. Error
can't access property "submit", e is null.
For debugging the problem, we have the following comparison and observation.
When viewed from the browser by pressing F12 in Console, as a visitor:
siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:3 JQMIGRATE: Migrate is installed, version 3.4.1
siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:778 Uncaught (in promise) IntegrationError: Stripe.js must be loaded from js.stripe.com. For more information https://stripe.com/docs/stripe-js/reference#including-stripejs
at e.value (siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:778:804316)
at new e (siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:778:744061)
at new Xb (siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:778:806075)
at I.createStripe (siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:865:2442)
at I.getStripe (siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:865:2340)
at siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:865:11683
at Ve (siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:865:12435)
at o (siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:865:17317)
at HTMLBodyElement.<anonymous> (siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:865:20930)
at HTMLBodyElement.dispatch (jquery.min.js?ver=3.7.1:2:40035)
value @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:778
e @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:778
Xb @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:778
createStripe @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:865
getStripe @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:865
(anonymous) @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:865
Ve @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:865
o @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:865
(anonymous) @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:865
dispatch @ jquery.min.js?ver=3.7.1:2
v.handle @ jquery.min.js?ver=3.7.1:2
trigger @ jquery.min.js?ver=3.7.1:2
(anonymous) @ jquery.min.js?ver=3.7.1:2
each @ jquery.min.js?ver=3.7.1:2
each @ jquery.min.js?ver=3.7.1:2
trigger @ jquery.min.js?ver=3.7.1:2
success @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:221
c @ jquery.min.js?ver=3.7.1:2
fireWith @ jquery.min.js?ver=3.7.1:2
l @ jquery.min.js?ver=3.7.1:2
(anonymous) @ jquery.min.js?ver=3.7.1:2
XMLHttpRequest.send
send @ jquery.min.js?ver=3.7.1:2
ajax @ jquery.min.js?ver=3.7.1:2
(anonymous) @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:3
e.<computed> @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:3
update_checkout_action @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:221
setTimeout
update_checkout @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:221
dispatch @ jquery.min.js?ver=3.7.1:2
v.handle @ jquery.min.js?ver=3.7.1:2
trigger @ jquery.min.js?ver=3.7.1:2
(anonymous) @ jquery.min.js?ver=3.7.1:2
each @ jquery.min.js?ver=3.7.1:2
each @ jquery.min.js?ver=3.7.1:2
trigger @ jquery.min.js?ver=3.7.1:2
init_checkout @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:221
dispatch @ jquery.min.js?ver=3.7.1:2
v.handle @ jquery.min.js?ver=3.7.1:2
trigger @ jquery.min.js?ver=3.7.1:2
(anonymous) @ jquery.min.js?ver=3.7.1:2
each @ jquery.min.js?ver=3.7.1:2
each @ jquery.min.js?ver=3.7.1:2
trigger @ jquery.min.js?ver=3.7.1:2
init @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:221
(anonymous) @ siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:221
e @ jquery.min.js?ver=3.7.1:2
t @ jquery.min.js?ver=3.7.1:2
setTimeout
(anonymous) @ jquery.min.js?ver=3.7.1:2
c @ jquery.min.js?ver=3.7.1:2
fireWith @ jquery.min.js?ver=3.7.1:2
fire @ jquery.min.js?ver=3.7.1:2
c @ jquery.min.js?ver=3.7.1:2
fireWith @ jquery.min.js?ver=3.7.1:2
ready @ jquery.min.js?ver=3.7.1:2
P @ jquery.min.js?ver=3.7.1:2
checkout/:1 The resource https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFVZ0bf8pkAg.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
checkout/:1 The resource https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:274 Mailchimp Pixel SDK not loaded within timeout. Tracking disabled. Error: Pixel SDK not available
at r (siteground-optimizer-combined-js-08e99a090438d50bf6032b4bda17bebf.js:274:1033)
checkout/:1 The resource https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFVZ0bf8pkAg.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
checkout/:1 The resource https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.When viewed from the browser by pressing F12 in Console, as a logged in user:
jquery-migrate.min.js?ver=3.4.1:2 JQMIGRATE: Migrate is installed, version 3.4.1
checkout/:691 GET https://secure.gravatar.com/avatar/53c55a6899cc042655b87fcc17e315eaece4729f8bd70063aaea98b8661b1cc4?s=52&d=mm&r=g net::ERR_CONNECTION_TIMED_OUT
checkout/:691 GET https://secure.gravatar.com/avatar/53c55a6899cc042655b87fcc17e315eaece4729f8bd70063aaea98b8661b1cc4?s=128&d=mm&r=g net::ERR_CONNECTION_TIMED_OUT
mailchimp-woocommerce-pixel-tracking.min.js?ver=1.0.0:1 Mailchimp Pixel SDK not loaded within timeout. Tracking disabled. Error: Pixel SDK not available
at r (mailchimp-woocommerce-pixel-tracking.min.js?ver=1.0.0:1:1033)This is a classic JavaScript conflict/loading issue. The critical error is clear: Stripe.js is being loaded from the wrong source. Let me guide you through a systematic debugging process.
🔍 Root Cause Analysis
The main error tells us everything:
IntegrationError: Stripe.js must be loaded from js.stripe.comYour site is loading Stripe.js from a combined/minified file (siteground-optimizer-combined-js) instead of Stripe's official CDN. This breaks Stripe Elements (credit card input).
📋 Debugging Process (Follow in Order)
Step 1: Verify the Stripe.js Loading Issue (Critical)
Check current Stripe.js source:
- Open browser DevTools (F12) → Network tab
- Filter for "stripe"
- Look for where
https://js.stripe.com/v3/is being loaded - Check if it's being requested at all vs. being bundled
Temporary test (2 minutes):
javascript// Paste in console to see Stripe status console.log(window.Stripe); console.log(document.querySelector('script[src*="stripe"]'));- If
window.Stripeis undefined → Stripe.js never loaded - If script src shows your domain → wrong source confirmed
- If
Step 2: Identify the Offending Plugin/Theme Feature
The combined file siteground-optimizer-combined-js-xxx.js indicates SiteGround Optimizer is at play.
Temporarily disable JavaScript minification/combination:
- WordPress Admin → SG Optimizer → Frontend Optimization
- Disable: "Minify JavaScript Files" and "Combine JavaScript Files"
- Clear all caches (plugin cache + browser cache)
- Test checkout again
If problem persists, also disable:
- "Defer Render-blocking JavaScript"
- "Delay JavaScript Execution"
Step 3: Test with Stripe-Specific Exclusions
In SG Optimizer settings, find JavaScript Excludes and add:
js.stripe.com
stripe
stripe.jsAlso check if you're using:
- WooCommerce Stripe Payment Gateway plugin settings
- Any Stripe-related "Local Mode" or "Debug Mode" options
Step 4: Additional Conflict Tests
Since the error only affects logged-out visitors:
Clear all transients:
sql-- Via phpMyAdmin or WP CLI DELETE FROM wp_options WHERE option_name LIKE '%transient%stripe%';Test with default theme temporarily (Storefront or Twenty Twenty-Four):
- Check if error persists
- If it disappears → theme's checkout.js/scripts are conflicting
Check for deferred script issues:
html<!-- Look in page source for Stripe script tag --> <script src='https://js.stripe.com/v3/' defer></script>Remove
deferorasyncattributes if present
Step 5: Verify WooCommerce Stripe Settings
- Go to: WooCommerce → Settings → Payments → Stripe
- Check these settings:
- "Stripe Checkout" mode (should be off unless using separate checkout)
- "Debug Mode" (enable briefly to see more errors)
- "Manual Capture" vs automatic (unrelated but worth checking)
- Save settings twice (forces regeneration of Stripe keys/scripts)
Step 6: Deep Debug (Technical)
If above fails, add this to your theme's functions.php temporarily:
add_action('wp_enqueue_scripts', 'force_stripe_from_cdn', 999);
function force_stripe_from_cdn() {
if (is_checkout()) {
// Deregister any local Stripe
wp_deregister_script('stripe');
wp_deregister_script('wc-stripe');
// Force load from official CDN
wp_enqueue_script('stripe', 'https://js.stripe.com/v3/', array(), null, true);
}
}🎯 Most Likely Solution (90% probability)
Based on the error pattern:
Disable JavaScript combination in SiteGround Optimizer and add exclusions:
- WordPress Dashboard → SG Optimizer → Environment Optimization
- Disable: "JavaScript Combination" (not minification, just combination)
- Keep: "JavaScript Minification" (still safe to use)
- Add to Exclude from JavaScript Minification:
/stripe/ stripe.js js.stripe.com - Purge all caches:
- SG Optimizer → Purge SG Cache
- Browser hard refresh (Ctrl+Shift+R)
📊 Verification Checklist
After each change, test as incognito/private browser (logged out):
- Stripe.js loads from
https://js.stripe.com/v3/(check Network tab) - No "IntegrationError" in console
- Credit card iframe/elements are interactive
- Checkout works with test card
4242 4242 4242 4242
🚨 If Still Broken
Check for these less common issues:
Content Security Policy (CSP) blocking Stripe:
- Check console for CSP errors
- Add
js.stripe.comandconnect.stripe.comtoscript-srcandframe-src
SSL certificate issues (Stripe requires valid SSL):
Plugin conflict (temporarily disable Mailchimp, any caching plugins beyond SG Optimizer)
Contact SiteGround support - they may have specific exclusions needed:
The error only affecting logged-out users strongly suggests a caching or optimization setting that applies different rules to visitors vs. logged-in users. SG Optimizer's "logged-in users bypass" features are likely enabled.
Based on your input, I have checked this plugin Speed Optimizer - Frontend Optimization:
`Minify JavaScript Files`: `On`
`Exclude from JavaScript Minification`:
`Combine JavaScript Files`: `On`
`Exclude from JavaScript Combination`:Should I go ahead and add js.stripe.com/v3/ to the field of both Exclude from JavaScript Minification and Exclude from JavaScript Combination?
Yes, absolutely! This is almost certainly your culprit. The "Speed Optimizer" plugin (which is actually SiteGround Optimizer - they renamed it recently) is exactly what I suspected.
🎯 Immediate Action Steps
Add both of these to your exclusion fields:
For Exclude from JavaScript Minification:
js.stripe.com/v3/
stripe.jsFor Exclude from JavaScript Combination:
js.stripe.com/v3/
stripe.jsThen:
- Save the settings
- Purge all caches (the plugin should have a "Purge Cache" button)
- Clear your browser cache (Ctrl+Shift+Delete or Cmd+Shift+Delete)
- Test checkout in incognito/private window
🔍 Why This Will Work
The Speed Optimizer plugin is combining all your JavaScript files into one big file (the siteground-optimizer-combined-js-xxx.js you saw in the error). This breaks Stripe.js because:
- Stripe requires its script to load from their exact domain (
js.stripe.com) - When the plugin bundles it locally, Stripe's security checks fail
- The credit card iframe cannot be created →
window.Stripe= null
⚠️ Important Note
If this doesn't work immediately, you may need to disable "Combine JavaScript Files" entirely as a test. Some plugins don't respect the exclusion rules properly. Add this to your testing checklist:
- Try with just exclusions first
- If still broken → temporarily disable "Combine JavaScript Files" (keep minification on)
- Test again
- If it works with combination off, the exclusion isn't working properly
📝 Long-term Solution
Once confirmed working, you have two options:
Option A (Recommended): Keep combination ON with the exclusions you added Option B: Keep combination OFF but enable other optimizations (minification, deferring, etc.)
Option A gives you better performance while keeping Stripe functional. Just monitor after any plugin updates to ensure exclusions stick.
Let me know if this resolves the issue! The error message was very clear once we knew what to look for.