WordPress at Your Fingertips
function is not described

WC_Abstract_Order::set_total_tax() protected WC 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 5.8.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() ) ) );