WC_Cart::reset_totals
Reset cart totals to the defaults. Useful before running calculations.
Method of the class: WC_Cart{}
Hooks from the method
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->reset_totals();
WC_Cart::reset_totals() WC Cart::reset totals code WC 10.5.0
private function reset_totals() {
$this->totals = $this->default_totals;
$this->fees_api->remove_all_fees();
do_action( 'woocommerce_cart_reset', $this, false );
}