zero VAT

0.0/5
<?php
add_action('woocommerce_before_calculate_totals', function ($cart) {
	if (!WC()->session->get('zero_vat'))
		return;
	
	foreach ( $cart->get_cart() as $cart_item ) {
		$cart_item['data']->set_tax_class( 'zero-rate' );
	}
}, 10, 1);

Comments and reviews

{{ reviewsTotal }} Review
{{ reviewsTotal }} Reviews
{{ options.labels.newReviewButton }}
{{ userData.canReview.message }}

Description

Sets tax rate for all items in cart to 0%.

Author

Tags