WordPress Engineering · 7 min read

WooCommerce Checkout Not Working? Fix Errors Step by Step

Diagnose a WooCommerce checkout that is blank, stuck or failing payment: confirm page settings, caching, gateway compatibility and order logs.

Dark teal three-dimensional ecommerce checkout panel with payment card, warning node, diagnostic gear and verified payment step

When a WooCommerce checkout stops working, the visible symptom can be a blank screen, a spinning button, a failed payment, a missing checkout form or a customer returning to the cart. Those failures do not share one fix. A blank page may be a rendering conflict, a 404 may be a page assignment or rewrite problem, and a payment failure may come from a gateway or webhook that never completes. Troubleshoot the exact stage rather than deactivating random plugins.

Step 1: Record the failing checkout step

Open a private browser session, add a simple product, visit the cart, proceed to checkout and stop at the first incorrect behavior. Note the URL, status code, browser console errors and network response. Does the form load but submission fail? Is shipping missing? Does the gateway decline after redirect? Is the order created in WooCommerce even though the customer sees an error? Each answer points to a different system boundary.

  • Confirm the product is purchasable and in stock.
  • Try one simple shipping and tax scenario.
  • Test checkout as a guest and as a logged-in customer if both are enabled.
  • Check mobile and desktop separately when the problem is layout or JavaScript related.
  • Record an order ID for any payment attempt that reaches WooCommerce.

Step 2: Verify cart and checkout page assignments

WooCommerce needs correctly assigned cart, checkout and account pages. Open WooCommerce → Settings → Advanced and confirm the page mapping. A page may exist but contain the wrong content. Modern stores may use Checkout blocks; classic stores use the [woocommerce_checkout] shortcode. Do not paste both into the same page or assume a gateway supporting classic checkout automatically supports Checkout blocks.

wp option get woocommerce_cart_page_id
wp option get woocommerce_checkout_page_id
wp option get woocommerce_myaccount_page_id
# Inspect checkout page content; replace 123 with the returned ID:
wp post get 123 --field=post_content

If a checkout page returns 404, review the page status and permalinks. Saving Settings → Permalinks may regenerate rewrite rules. If the problem appeared after a migration, verify the destination domain and the gateway return URL configuration. Do not use aggressive URL replacements without first making a database backup.

Step 3: Exclude dynamic commerce pages from page caching

Product catalog pages may be cached; carts, checkout and customer account views usually need dynamic responses. A CDN or optimization plugin that caches personalized content can display stale cart quantities, break nonces and redirect customers incorrectly. Check the host or proxy cache configuration, not only the WordPress plugin settings. WooCommerce-aware cache configurations commonly exclude these flows, but you must verify the actual behavior.

Purge caches selectively, open a private window, add a product, change its quantity and confirm the checkout reflects the latest cart. If the problem disappears only when bypassing the CDN, compare cache headers and bypass rules. Avoid globally disabling all caching permanently because that can slow the rest of the store without solving the configuration defect.

Step 4: Check JavaScript errors and failed requests

Open DevTools → Network and Console, then repeat the failure with Preserve log enabled. A blocked request, HTTP 403 from a security layer, REST API error or uncaught JavaScript exception can interrupt checkout. For Checkout blocks, inspect Store API requests; for classic checkout, inspect the WooCommerce AJAX requests. Security plugins and optimization tools that defer or combine scripts can introduce race conditions.

Fix the specific script or firewall rule and retest. Do not disable all security protection, turn off CSRF validation or whitelist every /wp-json request to make the browser errors disappear. A broad exception can expose the store to unnecessary risk.

Step 5: Inspect WooCommerce and gateway logs

Go to WooCommerce → Status → Logs and locate the gateway-specific log for the failed attempt. Use the order ID and timestamp to correlate events. Gateways often separate authorization, capture, return redirects and asynchronous webhooks. A customer leaving the payment page before the redirect returns does not necessarily mean money was not captured. Compare the WooCommerce order state with the provider dashboard before retrying.

Review whether webhooks reach the server, whether the signing secret matches the provider configuration and whether the event is processed idempotently. Do not write raw payment payloads, access tokens or card data to general application logs. Use sanitized IDs and state transitions.

Step 6: Add temporary, privacy-conscious order-state logging

The following example logs only order identifiers and status changes. It helps you tell whether WooCommerce reached order processing at all. It is not a replacement for payment provider logs and will not fire if checkout fails before an order changes status. Put it in a small site-specific plugin, deploy to staging first and remove it once the issue is resolved.

add_action( 'woocommerce_order_status_changed',
    function ( $order_id, $from, $to, $order ) {
        if ( ! function_exists( 'wc_get_logger' ) ) {
            return;
        }
        wc_get_logger()->info(
            sprintf( 'Order %d: %s -> %s', (int) $order_id, $from, $to ),
            array( 'source' => 'checkout-diagnostics' )
        );
    },
    10,
    4
);

WooCommerce logs are operational data, not analytics content. Restrict access and retention. If the checkout creates an order successfully but the gateway never confirms it, focus on payment notifications and network callbacks rather than rebuilding the checkout page.

Step 7: Test theme and extension conflicts methodically

In a staging clone, switch to a supported default theme and temporarily isolate add-ons that customize checkout fields, shipping logic, taxes, currency or payment presentation. Test one change at a time and record the result. A compatibility issue can be restricted to the Checkout block while classic checkout continues to work, or vice versa. Check extension documentation before changing modes because some features depend on one implementation.

Do not deactivate payment plugins or switch checkout implementations in the middle of live trading without a maintenance plan. If the issue started immediately after an update, compare the updated component with the known-good version, but retain database and order compatibility in any rollback.

Step 8: Test shipping, tax and address validation

A checkout that cannot show shipping methods may be working exactly as configured for an unsupported destination. Verify shipping zones, customer location, tax rules and product shipping classes. Repeat with a known eligible address and a simple product. Some gateways require billing fields that a custom checkout template hides; a missing field can make submission fail after the user fills everything visible.

Step 9: Verify the full payment lifecycle

A real checkout is not complete when the frontend displays a success message. Confirm the store created one order, recorded the expected total, received the gateway response, updated payment status once and sent notifications correctly. Retry the same browser flow in test mode, including cancellation, declined payment and a return after a network interruption. When testing webhook retries, make sure the order is not double-processed.

  • Cart reflects current quantities, shipping and discounts.
  • Checkout page renders without JavaScript errors for guests and signed-in users.
  • The payment provider is in the correct test or live mode.
  • Successful and failed payments transition to correct WooCommerce statuses.
  • A payment retry never captures the same order twice.
  • Customer email, thank-you page and inventory changes match the verified payment outcome.

Frequently asked questions

Why is the WooCommerce checkout page blank?

Common possibilities include an unassigned page, missing block or shortcode, conflicting theme template, script exception or a server failure. Start by checking the page assignment and the browser and PHP logs. Fixing the actual failure is more reliable than recreating the page blindly.

Should I clear cache to fix a stuck checkout?

Clearing a stale cache can provide useful evidence, but the important fix is to exclude dynamic checkout paths and cart sessions from inappropriate page caching. Retest with an updated cart in a private browser after the cache rules change.

My customer was charged but WooCommerce says failed. What now?

Check the provider transaction ID and webhook delivery history before triggering another charge. Reconcile the order state through the provider-supported procedure and document the correction. Avoid guessing from the frontend error alone.

For broader optimization after the checkout works again, see Why WooCommerce Gets Slow and WordPress at Scale.