From 9a88f6b46e797d82675cbe4802306f5f20a955a3 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Sat, 21 Apr 2012 17:38:34 +0100 Subject: [PATCH] woocommerce_get_price hook --- classes/class-wc-product.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/class-wc-product.php b/classes/class-wc-product.php index 75d78a8edf0..0a85d87b9ef 100644 --- a/classes/class-wc-product.php +++ b/classes/class-wc-product.php @@ -530,13 +530,13 @@ class WC_Product { /** Returns the product's price */ function get_price() { - return $this->price; + return apply_filters( 'woocommerce_get_price', $this->price, $this ); } /** Returns the price (excluding tax) - ignores tax_class filters since the price may *include* tax and thus needs subtracting */ function get_price_excluding_tax() { - $price = $this->price; + $price = $this->get_price(); if ( $this->is_taxable() && get_option('woocommerce_prices_include_tax')=='yes' ) : @@ -549,7 +549,7 @@ class WC_Product { endif; - return $price; + return apply_filters( 'woocommerce_get_price_excluding_tax', $price, $this ); } /** Returns the tax class */