From eed9485e6cc88266458640ef98c50fad55893e02 Mon Sep 17 00:00:00 2001 From: Justin Hill Date: Sat, 22 Feb 2014 13:15:41 -0700 Subject: [PATCH] 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. --- includes/abstracts/abstract-wc-product.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/abstracts/abstract-wc-product.php b/includes/abstracts/abstract-wc-product.php index 174db419516..d2dbc7a7b7f 100644 --- a/includes/abstracts/abstract-wc-product.php +++ b/includes/abstracts/abstract-wc-product.php @@ -401,7 +401,8 @@ class WC_Product { * @return bool */ 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 ); } /**