WordPress at Your Fingertips
function is not described

WC_Cart::get_coupon_discount_tax_amount() public WC 1.0

Get the discount tax amount for a used coupon (for tax inclusive prices).

{} It's a method of the class: WC_Cart{}

No Hooks.


float. discount amount


$WC_Cart = new WC_Cart();
$WC_Cart->get_coupon_discount_tax_amount( $code );
$code(string) (required)
coupon code.

Code of WC_Cart::get_coupon_discount_tax_amount() WC 5.7.1

public function get_coupon_discount_tax_amount( $code ) {
	$totals = $this->get_coupon_discount_tax_totals();
	return wc_cart_round_discount( isset( $totals[ $code ] ) ? $totals[ $code ] : 0, wc_get_price_decimals() );