/*
Theme Name: Nika Child
Theme URI: https://elementor3.thembay.com/nika/
Author: Thembay
Description: This is a child theme for Nika
Version: 1.0
Author URI: https://thembay.com/
Template: nika
Text Domain: nika-child
*/

/*  [ Add your custom css below ]
- - - - - - - - - - - - - - - - - - - - */


function save_custom_checkout_field($order, $data) {
    if (!empty($data['billing_company'])) {
        update_post_meta($order->get_id(), '_billing_company', sanitize_text_field($data['billing_company']));
    }
	 if (!empty($data['transaction_id'])) {
        update_post_meta($order->get_id(), '_transaction_id', sanitize_text_field($data['transaction_id']));
    }
}
add_action('woocommerce_checkout_update_order_meta', 'save_custom_checkout_field', 10, 2);