WordPress at Your Fingertips
function is not described

WC_Order_Item_Data_Store_Interface::add_order_item() public WC 1.0

Add an order item to an order.

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

No Hooks.

Return

Int. Order Item ID

Usage

$WC_Order_Item_Data_Store_Interface = new WC_Order_Item_Data_Store_Interface();
$WC_Order_Item_Data_Store_Interface->add_order_item( $order_id, $item );
$order_id(int) (required)
Order ID.
$item(array) (required)
order_item_name and order_item_type.

Code of WC_Order_Item_Data_Store_Interface::add_order_item() WC 5.8.0

public function add_order_item( $order_id, $item );