WC_Abstract_Order::set_total_tax()protectedWC 1.0

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

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

No Hooks.


null. Nothing.


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

Code of WC_Abstract_Order::set_total_tax() WC 6.9.4

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() ) ) );