is_vat_exempt check on orders expect a yes/no and not a bool, save values as string.

This commit is contained in:
Gerhard 2019-01-17 07:46:45 +02:00
parent 26f9aad65c
commit 8a685c3303
1 changed files with 2 additions and 1 deletions

View File

@ -336,7 +336,8 @@ class WC_Checkout {
$order->set_created_via( 'checkout' );
$order->set_cart_hash( $cart_hash );
$order->set_customer_id( apply_filters( 'woocommerce_checkout_customer_id', get_current_user_id() ) );
$order->add_meta_data( 'is_vat_exempt', WC()->cart->get_customer()->get_is_vat_exempt() );
$order_vat_exempt = WC()->cart->get_customer()->get_is_vat_exempt() ? 'yes' : 'no';
$order->add_meta_data( 'is_vat_exempt', $order_vat_exempt );
$order->set_currency( get_woocommerce_currency() );
$order->set_prices_include_tax( 'yes' === get_option( 'woocommerce_prices_include_tax' ) );
$order->set_customer_ip_address( WC_Geolocation::get_ip_address() );