Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hello Juluna,
    $total is pulled from an array of $totals. It is far from trivial to change the order, as the totals are generated by WooCommerce is that order.

    What is it you want to achieve?

    Ewout

    Thread Starter julunga

    (@julunga)

    Hello Ewout,

    Thank you for your quick response. My client would like to have changed following things. He wants that i delete the line with the Payment methods like “Creditcard”, because it`s not necessary für the bill at this point.

    for example in german:

    Zahlungsweise: Kreditkarte

    I hop you unterstand my problem and can help me.

    Julunga

    Plugin Contributor Ewout

    (@pomegranate)

    Hello Julunga,
    Luckily removing a line is not so difficult!
    Add the following snippet to your theme’s functions.php:

    add_filter( 'wpo_wcpdf_woocommerce_totals', 'wpo_wcpdf_remove_payment_method_total' );
    function wpo_wcpdf_remove_payment_method_total ( $totals ) {
    	unset($totals['payment_method']);
    	return $totals;
    }

    Thread Starter julunga

    (@julunga)

    Hi Ewout,

    Thanks for the help, it works. Is there still such a snippet to change the label name, like Tax, or subtotal etc.?

    Thank you
    Julunga

    Plugin Contributor Ewout

    (@pomegranate)

    Hello Julunga,
    Yes, that is possible. Within the same filter, you can set the label of each total: $totals['cart_subtotal']['label'], $totals['shipping']['label'], $totals['cart_discount']['label'], $totals['order_discount']['label'] etc. Good luck!

    Ewout

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Order of total/ PDF Invoices & Packing Slips’ is closed to new replies.