woocommerce_product_is_taxable
Returns whether or not the product is taxable.
Использование
add_filter( 'woocommerce_product_is_taxable', 'wp_kama_woocommerce_product_is_taxable_filter', 10, 2 ); /** * Function for `woocommerce_product_is_taxable` filter-hook. * * @param $condition * @param $that * * @return */ function wp_kama_woocommerce_product_is_taxable_filter( $condition, $that ){ // filter... return $condition; }
- $condition
- -
- $that
- -
Где вызывается хук
woocommerce_product_is_taxable
woocommerce/includes/abstracts/abstract-wc-product.php 1730
return apply_filters( 'woocommerce_product_is_taxable', $this->get_tax_status() === 'taxable' && wc_tax_enabled(), $this );