WC_REST_Orders_V2_Controller::prepare_coupon_lines( array $posted, string $action = 'create', object $item = null )
Create or update an order coupon.
Description Description
Parameters Parameters
- $posted
-
(Required) Item data.
- $action
-
(Optional) 'create' to add coupon 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