Table of Contents
- Quick Pre-Checks (30-Second Diagnosis)
- Step 1: Diagnose JavaScript Errors via Browser Console
- Step 2: Fix WooCommerce REST API & AJAX Blockages
- Step 3: Resolve Caching & Performance Optimization Conflicts
- Step 4: Fix Payment Gateway & Nonce Failures
- Step 5: Resolve Theme & jQuery Compatibility Issues
- Frequently Asked Questions
- Still Not Working? Next Steps
- Final Thoughts
Quick Pre-Checks (30-Second Diagnosis)
-
Incognito guest test – Open the checkout page in a private/incognito window as a guest user, not while logged in as an administrator. Admin accounts bypass many caching, security, and nonce checks, so your results will not match real customer experience. If the button works in incognito, the problem is almost always caching or a logged-in session conflict.
-
Check for a grayed-out button – If the button is completely greyed out and unclickable:
- Confirm at least one payment gateway is enabled in WooCommerce → Settings → Payments.
- Verify a shipping method is available for the entered address (missing shipping options disable the place order button by default).
- Ensure all required checkout fields have valid input (invalid phone or email formats keep the button disabled in block-based checkouts).
-
Match your symptom to the right step
- Button does nothing when clicked → Start with Step 1 (JavaScript errors)
- Button spins forever but no order is created → Start with Step 2 or Step 3
- Order is created but stays “Pending payment” forever → Jump to Step 4
Step 1: Diagnose JavaScript Errors via Browser Console
- Go to your store, add a product to the cart, and navigate to the Checkout page.
- Right-click anywhere on the page, select Inspect, and switch to the Console tab. (You can also press F12 on most desktop browsers.)
- Click the broken checkout button and look for any red error messages.
Common Console Errors & Quick Fixes
-
TypeError: Cannot read property... of undefined
This is usually caused by an incompatible plugin (such as a multi-step checkout extension or custom checkout field manager) or custom theme code that conflicts with your current WooCommerce or PHP version. Deactivate checkout-related plugins one by one to isolate the culprit. If the error disappears on a default theme, your child theme’s
functions.phpor custom checkout template needs updating. -
ReferenceError: wc_checkout_params is not defined
The most common error from performance optimization tools. WooCommerce’s core checkout script is being delayed, deferred, or loaded out of order. Skip to Step 3 for the JavaScript optimization fix.
-
403 Forbidden, 404 Not Found, or 500 Internal Server Error referencing /wp-json/wc/v3/ or /wp-json/wc/store/
Your site’s REST API endpoints are being blocked by a security plugin, firewall, or broken rewrite rules. Proceed to Step 2.
-
Mixed Content errors
Your checkout loads over HTTPS but some scripts or assets are loaded over HTTP. Fix this by updating your Site URL and WordPress Address to HTTPS in Settings → General, and run a database search-replace if needed to update old HTTP URLs.
Step 2: Fix WooCommerce REST API & AJAX Blockages
admin-ajax.php and wc-ajax) to validate fields, load payment methods, and process orders without a page refresh. If a security plugin, hosting firewall, or CDN blocks these endpoints, the checkout button will stop functioning.Quick Fix for REST API 404 Errors
- Go to WordPress Dashboard → Settings → Permalinks.
- Click Save Changes without modifying any settings.
1. Check Security Plugin Over-Optimization
- Open your security plugin settings.
- Disable “Restrict WordPress REST API Access” for standard WooCommerce routes, or add the following namespaces to your allowlist:
/wp-json/wc/v2/*/wp-json/wc/v3/*/wp-json/wc/store/*
2. Fix Cloudflare WAF False Positives
- Log in to your Cloudflare Dashboard → Security → Events.
- Look for blocked requests containing
/wp-json/,admin-ajax.php, orwc-ajax. - Create a WAF bypass rule for the checkout flow:
- Rule name: Bypass WooCommerce Checkout
- Field: URI Path
- Operator: contains
- Value:
/checkout - Action: Skip → All WAF managed rules, Rate limiting, Bot Fight Mode
- For full reliability, also create a Cache Rule to bypass edge caching for
/checkout/*,/cart/*, and/my-account/*paths.
Step 3: Resolve Caching & Performance Optimization Conflicts
1. Exclude Dynamic Pages from Page Caching
- Open your caching plugin settings (WP Rocket, LiteSpeed Cache, FlyingPress, etc.).
- Navigate to Never Cache URLs or Excluded Pages.
- Add these paths to the exclusion list:
/cart//checkout//my-account//wp-json/wc/store/
- If your plugin supports query parameter exclusions, add
wc-ajaxto the “Never Cache GET Parameters” list to ensure AJAX responses are never cached. - Purge all cache and test the checkout in an incognito window.
2. Exclude Checkout from JavaScript Optimization
wc_checkout_params is not defined in the console, this is your fix:- Open your speed/optimization plugin settings.
- Find the Delay JavaScript, Defer JS, or JS Combine section.
- Add the following scripts and keywords to the exclusion list:
wc-checkout.jswc-cart.jswc-checkout- Stripe and PayPal gateway script handles
/wp-content/plugins/woocommerce/assets/js/frontend/
- Save settings, purge all cache, and retest.
Step 4: Fix Payment Gateway & Nonce Failures
Important First Step: Clear WooCommerce Sessions & Transients
- Go to WooCommerce → Status → Tools.
- Click Clear WooCommerce transients.
- Click Clear customer sessions.
Stripe (Official WooCommerce Stripe Gateway)
- Console check: Look for errors mentioning
stripe.js,wc-stripe, or blocked requests tohttps://api.stripe.com. If Stripe scripts are blocked by a Content Security Policy, ad blocker, or cookie consent plugin, the button will fail silently. - Verify API keys: Go to WooCommerce → Settings → Payments → Stripe. Confirm your Live Publishable Key and Live Secret Key exactly match the values in your Stripe Dashboard. A key mismatch will fail with no visible error message.
- Webhook verification (for Pending payment orders): If orders are created but never update status, check your webhook configuration. In your Stripe Dashboard → Developers → Webhooks, confirm the endpoint URL (e.g.,
https://yourdomain.com/wp-json/wc/v3/webhooks) is correctly configured and the Signing Secret matches the Webhook Secret in your WooCommerce settings. - Block checkout tip: Temporarily disable express payment buttons (Apple Pay / Google Pay) in the Stripe plugin settings. Misconfigured express buttons can interrupt the main checkout button’s JavaScript execution.
PayPal
- Console check: Look for blocked requests to
https://www.paypal.com/sdk/jsor errors referencingsmart-payment-buttons. PayPal’s SDK being blocked by an ad blocker, CSP, or cookie plugin will break the checkout button completely. - Verify credentials: Confirm your PayPal Client ID and Secret are valid for the live environment (not sandbox). Test in sandbox mode to rule out credential issues.
- Use the official plugin: For block-based checkouts, older third-party PayPal plugins frequently break. Switch to the official WooCommerce PayPal Payments extension, which fully supports Cart and Checkout blocks.
Cookie Consent / GDPR Plugin Note
Step 5: Resolve Theme & jQuery Compatibility Issues
- Temporarily switch your site’s active theme to the official Storefront theme or the latest default WordPress Twenty theme.
- Test the checkout button in an incognito window.
- If the button starts working immediately, your premium theme’s custom checkout template is outdated. You will need to update the theme to the latest version, or contact the theme developer to patch their
form-checkout.phpand block template overrides.
Why is my WooCommerce place order button not working?
Why is my WooCommerce checkout button greyed out?
Can caching plugins break the WooCommerce checkout?
Why does my checkout work for me but not for customers?
Still Not Working? Next Steps
- Enable WordPress debug logging and check your site’s
debug.logfor PHP fatal errors during checkout. - Review your hosting error logs for server-side timeouts or memory limit errors.
- Reach out to your payment gateway’s support team with screenshots of your browser console errors.
- If you experience random failures during peak traffic, you may be hitting PHP worker limits or database performance bottlenecks.

