WordPress at Your Fingertips
function is not described

WC_Cart::set_discount_total() public WC 3.2.0

Set discount_total.

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

No Hooks.

Return

null. Nothing.

Usage

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

Changelog

Since 3.2.0 Introduced.

Code of WC_Cart::set_discount_total() WC 5.6.0

public function set_discount_total( $value ) {
	$this->totals['discount_total'] = $value;
}