WC_Cart::reset_totals()privateWC 1.0

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

Method of the class: WC_Cart{}

Hooks from the method

Return

null. Nothing (null).

Usage

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

WC_Cart::reset_totals() code WC 8.7.0

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