Change Cart Total Price In WooCommerce
Answer : This does not answer this question. Loic's does. This is another way of doing it to show a line item of 10% off: function prefix_add_discount_line( $cart ) { $discount = $cart->subtotal * 0.1; $cart->add_fee( __( 'Down Payment', 'yourtext-domain' ) , -$discount ); } add_action( 'woocommerce_cart_calculate_fees', 'prefix_add_discount_line' ); Since Woocommerce 3.2+ it does not work anymore with the new Class WC_Cart_Totals ... New answer: Change Cart total using Hooks in Woocommerce 3.2+ First woocommerce_cart_total hook is a filter hook, not an action hook. Also as wc_price argument in woocommerce_cart_total is the formatted price , you will not be able to increase it by 10%. That's why it returns zero. Before Woocommerce v3.2 it works as some WC_Cart properties can be accessed directly You should better use a custom function hooked in woocommerce_calculate_totals action hook this w...