Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Discount removed when changing shipping: how to find and fix it

CNV-171Medium impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

A shopper adds a coupon, then changes the shipping method (for example from standard to express, or from delivery to pickup). The checkout recalculates, and the discount line disappears or shrinks. Sometimes an error shows. Often nothing is said and the total just rises.

It is different from a coupon being rejected in the first place. Here the code was accepted and later lost.

Why it costs you leads or sales

Shoppers who used a code expect to pay the price they saw. A higher total at the last step feels like a trick. Some leave, some contact support, and some come back later without the code. Paid traffic that arrived on a promotion is hit hardest, because the offer was the reason to click.

Where the discount is lost
  1. Add to cartProduct added
  2. Apply codeDiscount accepted
  3. Change shippingDiscount line removed
  4. Review totalHigher than expected
  5. PayShopper abandons

The checkout works until the shipping method changes and the discount is dropped.

Checkout completion by shipping choiceExample numbers
Checkout completion by shipping choice (example)Discount kept: 62 %; Discount lost: 35 %024486235Discount keptDiscount lost%

Example: illustrative numbers only. Completion falls when the discount is lost after a shipping change.

How to check if your site has it

Test it by hand in a private window. Do it for every shipping method and region you offer, not only the default.

Manual test
  1. Add a product and apply the code

    Note the subtotal, the discount line and the total.

  2. Go to shipping

    Enter a delivery address so all methods appear.

  3. Switch method

    Select each option in turn, including pickup and free shipping.

  4. Compare

    Check that the discount line is unchanged (or changes only as the rules say) and that total = subtotal - discount + shipping + tax.

  5. Switch back

    Return to the first method. The discount should come back to the same value.

How to fix it

Common causes: the coupon is restricted to certain shipping methods or zones; a minimum-spend rule counts shipping; a theme or plugin script refreshes the order and drops the code; or caching serves a stale cart. Work through the platform below.

Fix by platform
  1. Check the coupon rules

    In WooCommerce go to Marketing > Coupons, open the code and review Usage restriction (minimum spend, products, categories). Make sure nothing depends on shipping.

  2. Test with plugins off

    On a staging copy, switch to a default theme and disable checkout, shipping and discount plugins one by one until the discount stays.

  3. Exclude checkout from caching

    Make sure cart, checkout and the wc-ajax requests are not cached by your cache plugin or CDN.

Example: re-validate the coupon after shipping changes (adapt to your backend)javascript
async function onShippingChange(methodId) {
  const res = await fetch('/api/cart/shipping', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ shippingMethod: methodId })
  });
  const cart = await res.json();
  // The server keeps the coupon and returns the new totals
  renderTotals(cart.subtotal, cart.discount, cart.shipping, cart.total);
}
Shipping change

Broken

  • Discount line disappears
  • Total rises with no message
  • Shopper must re-enter the code

Fixed

  • Discount stays or changes with a clear message
  • Total matches the visible lines
  • Switching back restores the same value

How to confirm it's fixed

Confirmation checklist
  • Discount line is the same for every shipping method it should apply to
  • A clear message appears when a method makes the code ineligible
  • Total equals subtotal minus discount plus shipping plus tax
  • Switching methods back and forth gives repeatable results
  • Works on mobile and in a private window
  • Works for each region and each coupon type you run

How to prevent it happening again

Add the shipping-change test to your release checklist and run it after every theme, plugin, app or shipping-rate update. Test before each promotion starts, and keep a list of codes with their rules.

How it unfolds
  1. Day 1

    A shipping plugin update is installed

  2. Day 2

    Shoppers who change shipping lose their discount

  3. Day 5

    Support gets complaints; sales dip

  4. Day 6

    The test is run and the plugin setting corrected

How FunnelGuard handles this

FunnelGuard detects this only partly. After the robot changes the shipping method, it runs an order_total_consistent check, which confirms the order total still adds up. A total that no longer adds up will be flagged, with a screenshot and a likely cause, after a re-check from a second region.

What it does not do: it does not compare the discount line before and after the change. If the discount is dropped and the total still adds up correctly with the higher price, the check can pass.

Shipping change and the discountInteractive
Checkout drops the coupon on shipping change

Coupon dropped

Leads or data lost

The discount line disappears and the total rises at the last step, so shoppers abandon.

Toggle the cause to compare the outcomes.

Questions people ask

Why is my discount code removed when I change shipping?

Usually the coupon has a rule tied to shipping, such as free shipping only or a minimum spend that includes shipping. It can also be a plugin or script that rebuilds the order without reapplying the code. Check the coupon's rules first, then test with plugins disabled.

Why does my checkout total change after choosing a shipping method?

Shipping cost and tax are added when the method is chosen, so the total should rise by those amounts. If it rises by more, the discount has probably been lost or recalculated. Compare the lines before and after.

How do I test whether a coupon survives a shipping change?

Apply the code, move to shipping, and select every method in turn, then switch back to the first. The discount line should stay the same unless the coupon's rules say otherwise. Do this in a private window on desktop and mobile.

Should a free shipping coupon disappear if I pick express shipping?

It can, if the code is set to apply only to certain methods or rates. In that case, show a clear message so the shopper knows why. A silent change is the part that hurts conversions.

Can caching remove a discount at checkout?

Yes. If cart or checkout requests are cached, shoppers can see stale totals or lose their code. Exclude cart, checkout and their AJAX requests from page and CDN caching.

Can FunnelGuard detect a discount removed when shipping changes?

Only partly. It checks that the order total is consistent after the shipping change, but it does not compare the discount line. You should still test each shipping method by hand.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: order_total_consistent after changing shipping; discount line not compared.

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.