Okay the title may not be that clear but I have an issue that seems poorly documented. I'm using a telesales/manual order system and need to work out a vat exempt system for users from another country.
I found the following after a very long search:
is_vat_exempt();
From what I read this saves in the session of the customer. Which is great. People are able to order without VAT themselves. However. In our telesales system you're often logged in as a admin related role. You fill in the details from the customer or select their account. During this process the so called customer is still the account that is logged in; the seller.
The code works something like this:
woocommmerce->customer->is_vat_exempt();
To set someone as vat exempt you can use the following:
set_is_vat_exempt( $is_vat_exempt );
Right now I am simply stuck. Would I be able to make the order vat exempt for the user that is filled in the form? Without changing the session to one for the customer?
If you have the customer variable or order id, like $customer = new WC_Customer( $order_id );
then just use $customer->is_vat_exempt();
. That's all.