WC_REST_Orders_V1_Controller::prepare_line_items( array $posted, string $action = 'create' )

Create or update a line item.


Description Description


Parameters Parameters

$posted

(Required) Line item data.

$action

(Optional) 'create' to add line item or 'update' to update it.

Default value: 'create'


Top ↑

Return Return

(WC_Order_Item_Product)


Top ↑

Source Source

File: includes/rest-api/Controllers/Version1/class-wc-rest-orders-v1-controller.php




Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.