• Resolved tdagsimon

    (@tdagsimon)


    Our WooCommerce shop is using the currency CHF. To comply with the shop system for our local orders we want it to round the total and the taxes to 0.05.

    I already managed to round the total like that in the functions.php:

    add_filter( 'woocommerce_calculated_total', 'round_price_product', 10, 1);
    function round_price_product( $price ){
    return round(($price + 0.000001) * 20) / 20;
    }

    Unfourtunately I have no Idea how to round the taxes. (in the example 0.46 to 0.45).
    Example

    Does someone know what I need to add in the functions.php so it will be rounded too?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @tdagsimon. Sorry that we missed your initial post.

    I don’t have a solution for this personally but I found this one which may help. You may want to join the conversation there since no one has been able to help in this thread.

    Thread Starter tdagsimon

    (@tdagsimon)

    Thank you for getting back to me. I fixed it with the Swiss 5-cent rounding plugin.

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