WordPress at a glance
function is not described

WC_Order_Item_Data_Store_Interface::add_metadata() public WC 1.0

Add term meta.

{} It's a method of the class: WC_Order_Item_Data_Store_Interface{}

No Hooks.

Return

Int. New row ID or 0

Usage

$WC_Order_Item_Data_Store_Interface = new WC_Order_Item_Data_Store_Interface();
$WC_Order_Item_Data_Store_Interface->add_metadata( $item_id, $meta_key, $meta_value, $unique );
$item_id(int) (required)
Item ID.
$meta_key(string) (required)
Meta key.
$meta_value(mixed) (required)
Meta value.
$unique(true/false)
Unique? (default: false).

Code of WC_Order_Item_Data_Store_Interface::add_metadata() WC 5.0.0

<?php
public function add_metadata( $item_id, $meta_key, $meta_value, $unique = false );