is_vat_exempt data in API Orders
Save and get is_vat_exempt data in API Orders
This commit is contained in:
parent
fc5e1ded54
commit
ba32ce62ba
|
@ -215,6 +215,7 @@ class WC_API_Orders extends WC_API_Resource {
|
|||
'tax_lines' => array(),
|
||||
'fee_lines' => array(),
|
||||
'coupon_lines' => array(),
|
||||
'is_vat_exempt' => $order->is_vat_exempt,
|
||||
);
|
||||
|
||||
// Add line items.
|
||||
|
@ -471,6 +472,11 @@ class WC_API_Orders extends WC_API_Resource {
|
|||
}
|
||||
}
|
||||
|
||||
// set is vat exempt
|
||||
if ( isset( $data['is_vat_exempt'] ) ) {
|
||||
update_post_meta( $order->id, '_is_vat_exempt', $data['is_vat_exempt'] );
|
||||
}
|
||||
|
||||
// calculate totals and set them
|
||||
$order->calculate_totals();
|
||||
|
||||
|
|
Loading…
Reference in New Issue