Today we talk about WooCommerce remove tax for product. Sometime in the scenario, you have to remove the tax bases on some condition. In the below example, I will explain how can you achieve this functionality.
add_filter( 'woocommerce_product_is_taxable' , 'product_product_custom_tax_status' , 10 , 2);
function product_product_custom_tax_status( $product_status , $product ){
//return true to enable Tax and false to disable tax
if( '20' == $product->get_id() ){
return false;
}else {
return true;
}
}
function product_product_custom_tax_status( $product_status , $product ){
//return true to enable Tax and false to disable tax
if( '20' == $product->get_id() ){
return false;
}else {
return true;
}
}