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

  • Resolved botoxparty

    (@adamhammad)


    Hi,

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

    The cart is managed via REST API (am using a custom implementation of https://wordpress.org/plugins/cart-rest-api-for-woocommerce/)

    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.

    e.g.

    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();

    Thanks

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

    (@flycart)

    Hi

    Apologies for the delayed response due to the weekend.
    Is it possible to send us a support request via https://www.flycart.org/support

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

    Thanks

    Plugin Author flycart

    (@flycart)

    Hey

    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.