I want to know if theres a way to show VAT = 0 in order details only to B2B users, i could even use a snippet for it, i just want to know how its done so i dont mess up the pluggin coding.
VAT in order details
Hi there,
The only way would be that the order or user is tax exempt when the order is first placed. I don't have a way to modify it afterwards - that would interfere with WooCommerce's inner workings.
Yes I am using tax exemption rules, it appears in cart VAT = 0, but in the invoice sent to the customer the Vat doesnt appear, is there a way with b2bkin that in the invoice the VAT is shown as VAT = 0 ? as i said before, i could use a snippet.
for instance i want to use this snippet to show vat = 0 in order:
add_filter( 'woocommerce_order_hide_zero_taxes', '__return_false' );
But i only want it to work on B2B users, so if you would please let me know what is the snippet for this to apply ONLY to B2B users I would appreciate :)
To make that snippet apply to only B2B users, you can write it as follows:
$user_id = get_current_user_id();
$is_b2b = get_user_meta($user_id,'b2bking_b2buser', true);
if ($is_b2b === 'yes'){
add_filter( 'woocommerce_order_hide_zero_taxes', '__return_false' );
}
(this would only work in the site frontend, not in the site backend / admin panel).