0

I want to change total tax amount in the checkout page and my code is below.

function change_tax_for_checkout_page( $cart ) {
    $cart->set_total_tax(20);//20USD
    $check =  $cart->calculate_totals();
    return $cart;
}

add_action( 'woocommerce_before_checkout_form', 'change_tax_for_checkout_page' );

But it's not working.

  • Check this answer - https://stackoverflow.com/questions/54427950/change-cart-total-using-hooks-in-woocommerce-3-2/54428561#54428561 and also this - https://stackoverflow.com/questions/47379965/add-custom-tax-value-at-woocommerce-checkout – Snuffy Apr 18 '22 at 08:53
  • Add fee and Cart Totals are working well but TAX amount update isn't working. – Mamedul Islam Apr 18 '22 at 11:57
  • Give more info what you are trying to do ? Do you have different taxes setup in your store ? If not just add one global tax and you dont need any code https://prnt.sc/XuESMH0GInwe – Snuffy Apr 18 '22 at 13:15

0 Answers0