WordPress at Your Fingertips
function is not described

WC_Cart::reset_totals() private WC 1.0

Reset cart totals to the defaults. Useful before running calculations.

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

Hooks from the method
Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->reset_totals();

Code of WC_Cart::reset_totals() WC 5.7.0

private function reset_totals() {
	$this->totals = $this->default_totals;
	$this->fees_api->remove_all_fees();
	do_action( 'woocommerce_cart_reset', $this, false );
}