woocommerce_calculate_totals

woocommerce_calculate_totals

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_calculate_totals') is found 1 times:

  • /includes/class-wc-cart-totals.php line 880
    		$this->cart->set_total_tax( $items_tax + $shipping_and_fee_taxes );
    
    		// Allow plugins to hook and alter totals before final total is calculated.
    		if ( has_action( 'woocommerce_calculate_totals' ) ) {
    			do_action( 'woocommerce_calculate_totals', $this->cart );
    		}
    
    		// Allow plugins to filter the grand total, and sum the cart totals in case of modifications.
    		$this->cart->set_total( max( 0, apply_filters( 'woocommerce_calculated_total', $this->get_total( 'total' ), $this->cart ) ) );
    	}
    }