Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Cart remove item button not working: how to find and fix it

CNV-155Low impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

The remove item control in your cart (an X, a bin icon or a "Remove" link) does not take the product out. Sometimes nothing happens. Sometimes the item disappears and then comes back after a reload. Sometimes the total does not change.

Most carts remove items with a background request (AJAX, meaning the page talks to the server without reloading). If that request fails, is blocked or returns old data, the cart looks stuck.

Why it costs you leads or sales

Shoppers who added the wrong size, a duplicate or a product they changed their mind about cannot fix their order. Some will abandon the cart rather than pay for something they do not want. Others will contact support, or lose trust in the checkout.

The impact is usually lower than a broken checkout button because many shoppers only add what they want. It grows if you sell bundles, have upsell widgets or get many mistaken adds on mobile.

Where the journey stalls
  1. Add to cartWrong item added
  2. Open cartCart page loads
  3. Click removeNothing happens
  4. CheckoutShopper hesitates or leaves
  5. OrderNot placed

The shopper cannot correct the cart, so later steps are lost.

How to check if your site has it

Test the remove button
  1. Use a private window

    Open your store in an incognito window so cached data and logged-in extras do not hide the problem.

  2. Add two products

    Add two different items, then open the cart page and the mini-cart if you have one.

  3. Open the browser console

    Press F12 (or Cmd+Option+I on Mac) and open the Console and Network tabs.

  4. Click remove

    Watch for red errors in Console and for a failed (red) or missing request in Network. Note the status code.

  5. Reload the page

    Check the item is really gone and the total changed. If it returns, the server did not save the change.

  6. Repeat on mobile

    Test on a real phone. A small icon may be hard to tap or covered by another element.

What you see and the likely cause
SymptomLikely cause
Click does nothing, red error in ConsoleJavaScript error from a theme or plugin
Request returns 403 or 404Security rule, expired nonce or wrong URL
Item vanishes, then returns on reloadCached cart page or the request did not save
Works on desktop, not on mobileSmall tap target or overlay covering the button
Only fails for some productsBundle, subscription or custom line item logic

How to fix it

Start by finding what changed. Disable recent apps, plugins or theme edits one at a time and retest. The fix depends on your platform.

Fix by platform
  1. Exclude cart pages from caching

    In your caching plugin, exclude the cart, checkout and account pages, and the cookies woocommerce_items_in_cart and woocommerce_cart_hash. Clear the cache afterwards.

  2. Check for plugin conflicts

    Switch to a default theme such as Storefront on a staging copy and disable other plugins. Re-enable them one by one until the remove button breaks.

  3. Check JavaScript optimisation

    If you minify, combine or delay JavaScript, exclude the WooCommerce cart scripts (cart-fragments and wc-cart) and retest.

  4. Review the template

    If your theme overrides cart/cart.php, compare it with the current WooCommerce version. Old overrides can lose the remove link class or URL.

Shopify: remove a cart line with the Ajax APIjavascript
document.addEventListener('click', async (e) => {
  const btn = e.target.closest('[data-remove-line]');
  if (!btn) return;
  e.preventDefault();
  const line = Number(btn.dataset.removeLine); // 1-based line index
  const res = await fetch('/cart/change.js', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ line, quantity: 0 })
  });
  if (res.ok) {
    window.location.reload();
  } else {
    alert('Could not remove the item. Please try again.');
  }
});
Remove button behaviour

Broken

  • Click does nothing
  • Item returns after reload
  • Console shows a script error
  • Shopper leaves the cart

Fixed

  • Item leaves the cart at once
  • Total updates
  • Reload shows the same cart
  • Shopper continues to checkout

How to confirm it's fixed

Retest checklist
  • Remove an item from the cart page and see it disappear
  • Total, tax and shipping update correctly
  • Reload the page and the item stays removed
  • Remove the last item and the empty cart message shows
  • Works in the mini-cart or drawer as well
  • Works on iPhone Safari and Android Chrome
  • No red errors in the Console during the test
  • Works logged in and as a guest

How to prevent it happening again

Most cases follow a change: a theme update, a new plugin, a new caching rule or a script added to the cart. Test the cart after each one.

Habits that help
  • Test add, remove and quantity change after every theme, plugin or app update
  • Use a staging site for changes to the cart
  • Keep cart and checkout pages out of page caching
  • Add the cart to your release checklist
  • Ask support to report any cart complaint, then log it

How FunnelGuard handles this

FunnelGuard does not check the remove item button yet. It is not part of the default journeys, though it is a possible future check.

FunnelGuard does run your real customer journeys on a schedule, such as lead forms, checkouts, and booking and chat buttons, and checks each step. If a cart or checkout step in a monitored journey breaks, a failure is re-checked from a second region before one alert goes out with a screenshot and a likely cause. That covers broken paths to the order, not whether remove works.

To watch for this issue today, add a remove test to your release checklist and run it after each change. You can also use session recordings or error monitoring in your own tools to spot repeated clicks on the remove button, and review support tickets for cart complaints. A free read-only website audit and a free plan (1 site, 2 journeys, daily checks, no card) are available if you want to monitor the main purchase journey.

Questions people ask

Why is the remove button in my cart not working?

The usual causes are a JavaScript error from a theme or plugin, a blocked or failed cart request, or a cached cart page. Open the browser console, click remove and look for red errors or a failed request. That shows which one it is.

Why does the item come back after I remove it from the cart?

The page removed it visually, but the server did not save the change, or an old cached cart was shown on reload. Exclude cart pages from caching and check that the remove request returns a success status.

How do I fix remove from cart not working in WooCommerce?

Exclude the cart and checkout pages from caching, then test with a default theme and with plugins disabled to find the conflict. Also exclude WooCommerce cart scripts from JavaScript minify or delay settings.

How do I fix the cart remove button on Shopify?

Preview the store in the Dawn theme to see whether the theme or an app causes it. Then disable cart apps one by one. Custom themes should call /cart/change.js with the line number and quantity 0.

Why does remove from cart only fail on mobile?

The icon may be too small to tap, or another element such as a sticky bar or banner may sit over it. Test on a real phone and make the tap area at least about 44 pixels square.

Does a broken remove button hurt sales?

Yes, though usually less than a broken checkout button. Shoppers who cannot correct their cart may leave or contact support. The effect is larger with bundles, upsells and mobile traffic.

Does FunnelGuard check if the remove item button works?

Not yet. It is a possible future check and is not in the default journeys. For now, test the cart manually after changes.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.