Adding cart_contents_total filter.

This commit is contained in:
Brent Shepherd 2012-05-24 15:58:19 +10:00
parent 95fd76d896
commit a08ed36f23
1 changed files with 4 additions and 2 deletions

View File

@ -1661,10 +1661,12 @@ class WC_Cart {
*/
function get_cart_total() {
if ( ! $this->prices_include_tax ) {
return woocommerce_price( $this->cart_contents_total );
$cart_contents_total = woocommerce_price( $this->cart_contents_total );
} else {
return woocommerce_price( $this->cart_contents_total + $this->tax_total );
$cart_contents_total = woocommerce_price( $this->cart_contents_total + $this->tax_total );
}
return apply_filters( 'woocommerce_cart_contents_total', $cart_contents_total );
}
/**