Support » Plugin: Discount Rules for WooCommerce » Coupon not being calculated

  • Resolved botoxparty



    I’m using Discount Rules to apply discounts on Cart totals.

    The cart is managed via REST API (am using a custom implementation of

    Currently when the cart is updated (product added, quantity changed, product removed), the coupon is not applied until the next time a request for the cart occurs.


    1. Change quantity in cart (discount not applied)
    2. Change quantity again in cart (discount is applied from previous change)
    3. Remove an item (discount is applied from previous change)

    If you make a change and GET the cart again, the discount rule is reflected.

    After any cart changes, the API run the same function that is used to GET a cart.

    So my question is, what methods can I call to force your plugin to calculate the coupons before using WC()->cart->get_cart()?

    I have tried

    – FlycartWooDiscountRules->applyRulesBeforeMiniCart();
    – FlycartWooDiscountRules->applyCartDiscountRules();
    – WC()->cart->calculate_totals();


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author flycart



    Apologies for the delayed response due to the weekend.
    Is it possible to send us a support request via

    Let us pass this on to our developers to have a check and assist you with.


    Plugin Author flycart



    Since we have not heard back from you on this topic, we’re going to go ahead and close the thread.
    If you have any other questions please feel free to open a support ticket here.

    Thank You!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Coupon not being calculated’ is closed to new replies.