WooCommerce doesn’t show any VAT information when the customer is exempt (value set by the EU VAT Assistant), or for products which have a 0% VAT. You will need a customisation to show that information at checkout and on your invoices.
Customisations are outside the scope of our support service, but you could use the following snippet to get started:
/**
* Shows a "0% VAT" entry on the cart and checkout pages when
* the customer is VAT exempt.
*
* @param array $tax_totals
* @return array
* @link https://gist.github.com/mikejolley/6493682
*/
add_filter('woocommerce_cart_tax_totals', function($tax_totals) {
if(empty( $tax_totals ) && wc()->customer->is_vat_exempt()) {
$tax_totals['zero-rated'] = (object) array(
'label' => '0% VAT',
'amount' => 0,
'formatted_amount' => woocommerce_price(0),
'name' => '0% VAT',
'is_compound' => false,
);
}
return $tax_totals;
}, 10);
This should show a “0% VAT” entry on the checkout page, when the customer is VAT exempt after entering a valid VAT number.
I’m not sure that the “0% VAT” entry is carried over to the order and, from there to the invoice. If it’s not, you could write your custom code for your invoice to check if the order is VAT exempt, as follows:
function is_order_vat_exempt($order) {
return apply_filters('woocommerce_order_is_vat_exempt', $order->get_meta( 'is_vat_exempt') === 'yes', $order);
}
Finally, you can use this new function is_order_vat_exempt()
to check if the order is VAT exempt, and show a “0% VAT” on your invoice. The author of the invoicing plugin you use should be able to suggest the best way to do that.
-
This reply was modified 4 years, 4 months ago by
Diego. Reason: Typo in function is_order_vat_exempt()
-
This reply was modified 4 years, 4 months ago by
Diego. Reason: Typo in function is_order_vat_exempt()