Hi @rainfallnixfig
add_filter( 'woocommerce_product_tax_class', 'big_apple_get_tax_class', 1, 2 );
function big_apple_get_tax_class( $tax_class, $product ) {
if ( WC()->cart->subtotal > 150)
$tax_class = 'Zero rate';
return $tax_class;
}
Thank you for patient. But it seems not work now. The tax still there When order amount is more than 150.
Also I get an error in the product page of admin as below:
Notice: Trying to get property 'subtotal' of non-object in ...\WWW\wp-content\themes\theme-child\functions.php on line 119
An other question is I need add the country condition to avoid this snippet use for all countries.