Q:

how to pass data from woocommerce cart item to order item?

Using 'before_checkout' hook , im doing some calculations with the cart item data which is before payment. I need to send those data to order item meta in another hook like 'woocommerce_thankyou' after payment is done.
Is there a way to relate the cart items and its corresponding order which is created? 

A:

There is hook for add item meta for to be add to order so you can relate cart items and its corrosponding order:    
add_action('woocommerce_add_order_item_meta', 'add_order_item_meta_after_order', 10, 3);
function add_order_item_meta_after_order($item_id, $values, $cart_item_key) {       
    wc_add_order_item_meta($item_id, '_your_key_in_order', $values, true);
}

May be useful to you.

