WC_Cart::set_cart_contents_total()publicWC 3.2.0

Set cart_contents_total.

Method of the class: WC_Cart{}

No Hooks.

Return

null. Nothing (null).

Usage

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

Changelog

Since 3.2.0 Introduced.

WC_Cart::set_cart_contents_total() code WC 9.0.1

public function set_cart_contents_total( $value ) {
	$this->totals['cart_contents_total'] = wc_format_decimal( $value );
}