WC_Abstract_Order::set_total_tax()protectedWC 1.0

Sets order tax (sum of cart and shipping tax). Used internally only.

Method of the class: WC_Abstract_Order{}

No Hooks.

Return

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->set_total_tax( $value );
$value(string) (required)
Value to set.

WC_Abstract_Order::set_total_tax() code WC 8.7.0

protected function set_total_tax( $value ) {
	// We round here because this is a total entry, as opposed to line items in other setters.
	$this->set_prop( 'total_tax', wc_format_decimal( NumberUtil::round( $value, wc_get_price_decimals() ) ) );
}