WC_Cart::calculate_totals()
Calculate totals for the items in the cart.
Description Description
Source Source
File: includes/class-wc-cart.php
public function calculate_totals() {
$this->reset_totals();
if ( $this->is_empty() ) {
$this->session->set_session();
return;
}
do_action( 'woocommerce_before_calculate_totals', $this );
new WC_Cart_Totals( $this );
do_action( 'woocommerce_after_calculate_totals', $this );
}