WC_REST_Orders_V2_Controller::prepare_shipping_lines( array $posted, string $action = 'create', object $item = null )
Create or update an order shipping method.
Description Description
Parameters Parameters
- $posted
-
(Required) $shipping Item data.
- $action
-
(Optional) 'create' to add shipping or 'update' to update it.
Default value: 'create'
- $item
-
(Optional) Passed when updating an item. Null during creation.
Default value: null
Return Return
Source Source
File: includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php