Added woocommerce_calculate_totals hook to calculate totals function
This commit is contained in:
parent
3d325f676e
commit
ffd74d0898
|
@ -431,6 +431,9 @@ class woocommerce_cart {
|
|||
$this->tax_total = 0;
|
||||
endif;
|
||||
|
||||
// Allow plugins to hook and alter totals before final total is calculated
|
||||
do_action('woocommerce_calculate_totals', $this);
|
||||
|
||||
// Total
|
||||
if (get_option('woocommerce_prices_include_tax')=='yes') :
|
||||
$this->total = $this->subtotal + $this->shipping_tax_total - $this->discount_total + $woocommerce->shipping->shipping_total;
|
||||
|
|
Loading…
Reference in New Issue