woocommerce_get_price hook

This commit is contained in:
Mike Jolley 2012-04-21 17:38:34 +01:00
parent 9150c0695b
commit 9a88f6b46e
1 changed files with 3 additions and 3 deletions

View File

@ -530,13 +530,13 @@ class WC_Product {
/** Returns the product's price */ /** Returns the product's price */
function get_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 */ /** Returns the price (excluding tax) - ignores tax_class filters since the price may *include* tax and thus needs subtracting */
function get_price_excluding_tax() { function get_price_excluding_tax() {
$price = $this->price; $price = $this->get_price();
if ( $this->is_taxable() && get_option('woocommerce_prices_include_tax')=='yes' ) : if ( $this->is_taxable() && get_option('woocommerce_prices_include_tax')=='yes' ) :
@ -549,7 +549,7 @@ class WC_Product {
endif; endif;
return $price; return apply_filters( 'woocommerce_get_price_excluding_tax', $price, $this );
} }
/** Returns the tax class */ /** Returns the tax class */