Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Saravana Kumar K

    (@mycholan)

    You can, by using wc_add_order_item_meta(), do some thing like this

    $order = new WC_Order( $order_id );
    foreach ( $order->get_items() as $item_id => $item ) {
    	wc_add_order_item_meta( $item_id, "your_item_meta_key", "your_meta_value" );
    }

    Thread Starter gioh

    (@gioh)

    Okay, where would I add this?

    Thread Starter gioh

    (@gioh)

    Hello,

    Where would I do this at?

    I actually only have 1 order I want this added to since I added the plugin right away.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add Custom Field to previous orders?’ is closed to new replies.