I need to round up prices on my Woocommerce cart. It rounds up to 1. For example:
If the total price of the cart is $40.85, I need the cart to show $41.00.
I tried with this command but the price discount this 0.15 and I do not know how to do it. I found this in other sites but round up the products in the catalog.
add_filter( 'woocommerce_calculated_total', 'custom_calculated_total', 10, 2 );
function custom_calculated_total( $total, $cart ){
return round( $total - ($total * 0.15), $cart->dp );
}
Thanks for your help.