WordPress at Your Fingertips
function is not described

WC_Cart::set_totals() public WC 3.2.0

Set all calculated totals.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Cart = new WC_Cart();
$WC_Cart->set_totals( $value );
$value(array)
Value to set.
Default: array()

Changelog

Since 3.2.0 Introduced.

Code of WC_Cart::set_totals() WC 5.7.0

public function set_totals( $value = array() ) {
	$this->totals = wp_parse_args( $value, $this->default_totals );
}