File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
core-flows/src/order/workflows/order-edit Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ export const orderEditUpdateItemQuantityWorkflowId =
7979 * This workflow updates the quantity of an existing item in an order's edit. It's used by the
8080 * [Update Order Item Quantity Admin API Route](https://docs.medusajs.com/api/admin#order-edits_postordereditsiditemsitemitem_id).
8181 *
82+ * You can also use this workflow to remove an item from an order by setting its quantity to `0`.
83+ *
8284 * You can use this workflow within your customizations or your own custom workflows, allowing you to update the quantity of an existing
8385 * item in an order's edit in your custom flow.
8486 *
@@ -98,7 +100,7 @@ export const orderEditUpdateItemQuantityWorkflowId =
98100 *
99101 * @summary
100102 *
101- * Update the quantity of an existing order item in the order's edit.
103+ * Update or remove an existing order item's quantity in the order's edit.
102104 */
103105export const orderEditUpdateItemQuantityWorkflow = createWorkflow (
104106 orderEditUpdateItemQuantityWorkflowId ,
Original file line number Diff line number Diff line change @@ -188,6 +188,8 @@ export class OrderEdit {
188188 * [Update Item Quantity](https://docs.medusajs.com/api/admin#order-edits_postordereditsiditemsitemitem_id)
189189 * API route.
190190 *
191+ * You can also use this method to remove an item from an order by setting the `quantity` to `0`.
192+ *
191193 * @param id - The order edit's ID.
192194 * @param itemId - The item's ID in the order.
193195 * @param body - The data to edit in the item.
You can’t perform that action at this time.
0 commit comments