Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Apply tax based on subtotal
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 <= 110 )
$tax_class = 'Zero Rate';
return $tax_class;
}
@oiramalli

This comment has been minimized.

Copy link

commented Dec 8, 2017

Isn't woocommerce_product_tax_class deprecated in favor of woocommerce_product_get_tax_class?

@Harm1982

This comment has been minimized.

Copy link

commented Mar 6, 2019

Hi,

Is this code still valid? And, is this editable to be active online in one country. For example, if your in the Netherlands and you sell a certain product above the amount of 10.000 euro, the Tax (called BTW in dutch) can be deducted. (these are new rules/laws)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.