In Woocommerce checkout, I am trying to remove tax if billing_company
is not empty:
Here is my code
add_action( 'woocommerce_checkout_update_order_review', 'bbloomer_taxexempt_checkout_based_on_zip' );
function bbloomer_taxexempt_checkout_based_on_zip( $post_data ) {
global $woocommerce;
$woocommerce->customer->set_is_vat_exempt( false );
$Pay_options=$_POST['Pay_options'];
parse_str($post_data);
global $woocommerce;
if ( $billing_company != null) $woocommerce->customer->set_is_vat_exempt( true );
}
In IF
statement I also need to check if billing_country
is "Croatia".
How can I achieve this?