Fixing the “undefinedwc/store/v1/cart” 404 errors in WooCommerce 11.1

15 Sep 2026

WooCommerce mini cart 404 script errors

A client’s website started logging 404 errors for a mysterious URL: /undefinedwc/store/v1/cart. Nervous that this might be affecting the checkout workflow for legitimate customers, I jumped in to see if we could fix it.

Start with the log files

When analysing request/response errors (like 404, 301, etc), the best place to start is the website access and error logs. This is what we were seeing:

"GET /cart/undefinedwc/store/v1/cart HTTP/2.0" 404 1064297 "https://example.com/cart/"
"GET /checkout/undefinedwc/store/v1/cart HTTP/2.0" 404 1064297 "https://example.com/checkout/"

Seeing that “undefined” in the URI path is a real clue. When JavaScript tries to concatenate two strings together, but one of the variables has not had anything assigned to it, it will use the literal string “undefined”. Given that the referrer URLs were always the /cart/ and /checkout/ pages, this looks like a JavaScript mini-cart bug.

The site was still making sales, so it looked like a non-critical bug. But… a bug on the cart & checkout pages absolutely needs to be understood and resolved.

The problem and the fix

After a bit more digging, this is a known issue with WooCommerce 11.1, when the mini cart tries to load twice on a page.

The bug, on github: https://github.com/woocommerce/woocommerce/issues/68484

So all we need to do is dequeue mini-cart front-end script on the /cart/ and /checkout/ pages. Grab the following and save it into your child theme as headwall-mini-cart-404-fix.php.

/**
 * Plugin Name: Headwall Mini-Cart 404 Fix
 * Description: Stops the WooCommerce Mini-Cart script module loading on cart and checkout pages, where it requests "undefinedwc/store/v1/cart" in a retry loop. Temporary: remove once WooCommerce ships the fix for issue #68484.
 * Version:     1.0.0
 * Author:      Paul Faulkner
 * Author URI:  https://headwall-hosting.com/
 * License:     GPLv2 or later
 *
 * @see https://github.com/woocommerce/woocommerce/issues/68484
 * @see https://github.com/woocommerce/woocommerce/pull/66951
 *
 * @package Headwall_Mini_Cart_404_Fix
 */

defined( 'ABSPATH' ) || die();

const HWMC404_MINI_CART_MODULE_ID = 'woocommerce/mini-cart';

/**
 * Dequeues the Mini-Cart script module on cart and checkout pages.
 *
 * @return void
 */
function hwmc404_dequeue_mini_cart_module(): void {
	$is_cart_or_checkout = function_exists( 'is_cart' ) && function_exists( 'is_checkout' ) && ( is_cart() || is_checkout() );

	if ( $is_cart_or_checkout && function_exists( 'wp_dequeue_script_module' ) ) {
		wp_dequeue_script_module( HWMC404_MINI_CART_MODULE_ID );
	}
}

/**
 * Priority 1 runs before WordPress prints modules on wp_head / wp_footer (priority 10).
 * Block themes render the header before wp_head; classic themes render it after, so
 * both hooks are needed.
 */
add_action( 'wp_head', 'hwmc404_dequeue_mini_cart_module', 1 );
add_action( 'wp_footer', 'hwmc404_dequeue_mini_cart_module', 1 );

Test it:

  1. Navigate to your shop
  2. Add something to your cart
  3. Navigate to the checkout
  4. Show the browser’s Dev Tools
  5. Every few seconds, you should see a new 404 error in the JS Console

Add the following to your child theme’s functions.php, to activate the fix.

// Fix the multi min-cart problem: https://github.com/woocommerce/woocommerce/issues/68484
require_once __DIR__ . '/headwall-mini-cart-404-fix.php';

Now reload the checkout page, and you should see the 404 errors have stopped.

NOTE: Keep an eye on WooCommerce updates from 11.2 onwards. When this is fixed properly in Woo, you can remove this snippet from your site.

Leave a comment