• Hi there,

    seems like since 2.10 your plugin removes (and readds) (gateway) fees on every save_post event. That logic is triggered by checkout-fees-for-woocommerce/includes/class-alg-wc-order-fees.php. Please don’t do it. That’s a very bad practice and causes a lot of incompatibilities with other plugins – updating fees should only happen in case of a recalculation event, e.g. woocommerce_order_before_calculate_taxes (and/or in case the order payment gateway changes). Furthermore instead of removing the fee items altogether (as in Alg_WC_Order_Fees::remove_fees()), retrieve/search for the existing fee order item if existent. If it does not yet exist, add a new item.

    And please use Woo hooks, e.g. woocommerce_order_after_calculate_totals to do so in a standard-compliant way instead of using the save_post event. There is no need to trigger additional order save events.

    Best

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author tychesoftwares

    (@tychesoftwares)

    Hi @vendidero,

    Thank you for bringing this to our attention. We appreciate your feedback and concerns regarding the plugin’s current behavior.

    I’ll be sharing this with our development team and we will make sure to address this in future updates to the plugin.

    Hello,

    with 2.10.3 this problem is back for my shop.
    2.10.2 solved it and now its broken again.

    Thread Starter vendidero

    (@vendidero)

    Hi @renario,

    any updates on the issue?

    Best,
    Dennis

    Hi,

    i still use version 2.10.2.
    If i upgrade to 2.10.3 the error will occur, that if i create an invoice with discount (Skonto), it will create a cancellation.

    Thread Starter vendidero

    (@vendidero)

    Sorry, that was the wrong mention. I’ve wanted to ask for updates from @tychesoftwares on the issue?

    Best,
    Dennis

    Plugin Author tychesoftwares

    (@tychesoftwares)

    Hi @vendidero,

    I apologize for the delay in getting back to you. Our developer is actively working in the task and is currently in the process of reviewing the code across all files. I will definitely provide you with a comprehensive update by next week. Thank you for your patience.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Do not remove/add fees on every order save event’ is closed to new replies.