WC_Cart::set_total_tax()publicWC 3.2.0

Set total tax amount.

Method of the class: WC_Cart{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Cart = new WC_Cart();
$WC_Cart->set_total_tax( $value );
$value(string) (required)
Value to set.

Changelog

Since 3.2.0 Introduced.

WC_Cart::set_total_tax() code WC 8.7.0

public function set_total_tax( $value ) {
	// We round here because this is a total entry, as opposed to line items in other setters.
	$this->totals['total_tax'] = wc_round_tax_total( $value );
}