No Tax on Certain Sub Total
-
I’ve been trying to solve a tax issue we have with our site. In Maryland in the US, when the subtotal is 999.99 or higher, we need to, by law, now charge tax.
I’ve tried using the following code provided as an example on Woothemes.com:
add_filter( ‘woocommerce_product_tax_class’, ‘big_apple_get_tax_class’, 1, 2 );
function big_apple_get_tax_class( $tax_class, $product ) {
global $woocommerce;if ( $woocommerce->cart->subtotal <= 110 )
$tax_class = ‘Zero Rate’;return $tax_class;
}I tried using this code on my site but I changed the ‘<= 110’ to ‘>=1000’ because in MD the products we’re selling can’t be taxed above a $1000.00 if the subtotal is that much.
It seems anything over 500 will deliver this error. Any ideas?
When I put anything above 500 in I get an error on the checkout page like this:
Warning: Invalid argument supplied for foreach() in /home/brightlightdc/six.blmdevelopment.com/wp-content/plugins/woocommerce/includes/class-wc-tax.php on line 157
- The topic ‘No Tax on Certain Sub Total’ is closed to new replies.