feat(core-flows,order,medusa,types): update item metadata on item_update change action#14570
Conversation
🦋 Changeset detectedLatest commit: a6aa456 The changes in this PR will be included in the next version bump. This PR includes changesets to release 77 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 9 Skipped Deployments
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
|
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
|
Thank you for your contribution! 🎉 After an initial review, this PR looks good to us. Here's a summary: ✅ Linked to a verified issue (#14481) A team member will do a final review before this is merged. We appreciate your patience! Notes: Adding // packages/core/core-flows/src/order/workflows/order-edit/order-edit-update-item-quantity.ts
details: {
reference_id: item.id,
quantity: item.quantity,
unit_price: item.unit_price,
compare_at_unit_price: item.compare_at_unit_price,
quantity_diff: quantityDiff,
// metadata is accepted by the type but silently dropped here
},This means a caller using |
Summary
What — What changes are introduced in this PR?
Allow to update item
metadataonITEM_UPDATEorder change action.Why — Why are these changes relevant or necessary?
You are unable to update a draft order item
metadata.How — How have these changes been implemented?
Update item
metadataif specified in the order change action details when theITEM_UPDATEprocessing handler gets executed.Testing — How have these changes been tested, or how can the reviewer test the feature?
Integration tests.
Examples
Provide examples or code snippets that demonstrate how this feature works, or how it can be used in practice.
This helps with documentation and ensures maintainers can quickly understand and verify the change.
// Example usageChecklist
Please ensure the following before requesting a review:
yarn changesetand follow the promptsAdditional Context
Add any additional context, related issues, or references that might help the reviewer understand this PR.
closes #14481
Note
Adds support for updating item
metadataduring draft order item updates.update-draft-order-itemnow includesmetadatain actiondetailsforITEM_UPDATEmetadatainto bothitem.detail.metadataanditem.metadatametadatafor new/existing items and related inputsmetadatain draft order item update payloadsdetail.metadatato exposed itemmetadataWritten by Cursor Bugbot for commit 350a79e. This will update automatically on new commits. Configure here.