Skip to content

Instantly share code, notes, and snippets.

View oiramalli's full-sized avatar
🏠
Working from home

Mario Alvarado oiramalli

🏠
Working from home
View GitHub Profile
@mikejolley
mikejolley / gist:5568708
Last active January 5, 2021 18:35
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;
}