Get value from an input field and pass into update_meta_data as $meta_value
You can use the $posted parameter to get the right value in your function. add_action(‘woocommerce_checkout_update_order_meta’,function( $order_id, $posted ) { $order = wc_get_order( $order_id ); $order->update_meta_data( ‘recipient_email’, $posted[‘recipient_email’] ); $order->save(); } , 10, 2); Verify that $posted is an array not an object with a var_dump on $posted. if it’s an object replace $posted[‘recipient_email’] with $posted->recipient_email … Read more