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:
parent
1f8d223ecc
commit
eed9485e6c
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue