Update abstract-wc-product.php

Add filter to is_taxable() method so that plugins can better control what is and isn't taxable based on various conditions, such as customer's billing or shipping address, etc.
This commit is contained in:
Justin Hill 2014-02-22 13:15:41 -07:00
parent 1f8d223ecc
commit eed9485e6c
1 changed files with 2 additions and 1 deletions

View File

@ -401,7 +401,8 @@ class WC_Product {
* @return bool * @return bool
*/ */
public function is_taxable() { public function is_taxable() {
return $this->tax_status == 'taxable' && get_option( 'woocommerce_calc_taxes' ) == 'yes' ? true : false; $taxable = $this->tax_status == 'taxable' && get_option( 'woocommerce_calc_taxes' ) == 'yes' ? true : false;
return apply_filters( 'woocommerce_product_is_taxable', $taxable, $this );
} }
/** /**