WC_Abstract_Order::set_cart_tax()publicWC 1.0

Set cart tax.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Abstract_Order = new WC_Abstract_Order();
$WC_Abstract_Order->set_cart_tax( $value );
$value(string) (required)
Value to set.

Code of WC_Abstract_Order::set_cart_tax() WC 6.8.2

public function set_cart_tax( $value ) {
	$this->set_prop( 'cart_tax', wc_format_decimal( $value, false, true ) );
	$this->set_total_tax( (float) $this->get_cart_tax() + (float) $this->get_shipping_tax() );
}