WordPress at Your Fingertips
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.


Int. New row ID or 0


$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? (default: false).
Default: false

Code of WC_Order_Item_Data_Store_Interface::add_metadata() WC 5.8.0

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