From f11613c5e9784d8b624e03b23e7a7d2d3c251b61 Mon Sep 17 00:00:00 2001 From: Gerhard Date: Tue, 15 Jan 2019 13:20:07 +0200 Subject: [PATCH] Set order vat exempt status to that of customer on checkout. --- includes/class-wc-checkout.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/class-wc-checkout.php b/includes/class-wc-checkout.php index 42a2d729731..75554b6d4a2 100644 --- a/includes/class-wc-checkout.php +++ b/includes/class-wc-checkout.php @@ -336,6 +336,7 @@ 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->set_meta( 'is_vat_exempt', WC()->cart->get_customer()->get_is_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() );