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


Top ↑

Return Return

(WC_Order_Item_Shipping)


Top ↑

Source Source

File: includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php




Top ↑

User Contributed Notes User Contributed Notes

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