I am using the hook below to currently exclude tax from the subtotal on the shopping cart. But changing out cart with checkout is not in the docs.
How can I exclude the tax from the Checkout page Subtotal?
Thanks.
add_filter( 'woocommerce_cart_product_subtotal', 'exclude_tax_cart_product_subtotal', 15, 4 );
function exclude_tax_cart_product_subtotal( $product_subtotal, $_product, $quantity, $object ) {
$row_price = $_product->get_price_excluding_tax( $quantity );
$ex_tax = wc_price( $row_price );
return $ex_tax;
}
‘woocommerce_cart_subtotal’ filter modified the subtotal output in checkout page.