Last active
March 15, 2024 17:02
-
-
Save woogists/bb02074645cf28b32f367f0dc01fb171 to your computer and use it in GitHub Desktop.
Apply WooCommerce tax based on the subtotal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_product_get_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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment