• Ok, this is a somewhat confusing post title…

    The case is that in Norway it’s usual to present order totals as follow:

    order subtotal (inc VAT) 100kr
    shipping (inc VAT) 40kr
    order total (inc VAT) 140kr

    of which VAT 28kr

    By default it is shown like this

    order subtotal (inc VAT) 100kr
    shipping (inc VAT) 40kr
    of which VAT 28kr
    order total (inc VAT) 140kr

    Would it be possible to move the “of which VAT” under the order total by somehow changing the wcdn_get_order_totals?

    Thanks!

    https://www.ads-software.com/extend/plugins/woocommerce-delivery-notes/

Viewing 2 replies - 1 through 2 (of 2 total)
  • the plugin uses the same order totals output as woocommerce. so you rather need to change the order in woocommerce first via a filter hook. and also set the vat settings in woocommerce correctly. here some code to give you an idea:

    function change_order_items_order($total_rows, $order) {
        // now reorder the $total_rows to the way you like it
        return $total_rows;
    }
    add_filter( 'woocommerce_get_order_item_totals', 'woocommerce_get_order_item_totals', 10, 2);
    Thread Starter tomboersma

    (@tomboersma)

    Thanks so far!

    My php knowledge is unfortunately not good enough to finish this snippet but I’ll post my question at Woocommerce, where it belongs…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘order totals order’ is closed to new replies.