From c7acf9ff29b40a934ff5f8bb517b7ba3ebbd82c0 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 22 Feb 2012 10:01:47 +0000 Subject: [PATCH] hook for total --- classes/class-wc-cart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/class-wc-cart.php b/classes/class-wc-cart.php index a28addbaccd..c82c66c2db2 100644 --- a/classes/class-wc-cart.php +++ b/classes/class-wc-cart.php @@ -1019,7 +1019,7 @@ class WC_Cart { * * Based on discounted product prices, discounted tax, shipping cost + tax, and any discounts to be added after tax (e.g. store credit) */ - $this->total = number_format( $this->cart_contents_total + $this->tax_total + $this->shipping_tax_total + $this->shipping_total - $this->discount_total, 2, '.', ''); + $this->total = apply_filters('woocommerce_calculated_total', number_format( $this->cart_contents_total + $this->tax_total + $this->shipping_tax_total + $this->shipping_total - $this->discount_total, 2, '.', ''), $this); if ($this->total < 0) $this->total = 0; }