fix(core-flows): ensure full pricing context when adding items to draft order#14941
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 9 Skipped Deployments
|
🦋 Changeset detectedLatest commit: 8edde33 The changes in this PR will be included in the next version bump. This PR includes changesets to release 76 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 |
| "currency_code", | ||
| "locale", | ||
| ], | ||
| fields: [...fieldsForPricingContext], |
There was a problem hiding this comment.
Suggestions: is it really necessary to copy the array here?
| "email", | ||
| "customer.groups.id", | ||
| ] | ||
| export const cartFieldsForPricingContext = [...fieldsForPricingContext] |
There was a problem hiding this comment.
Suggestion: same as the other one
|
Hi, question will this also enable price lists on draft orders? That is currently not working. |
|
Thank you for your contribution! 🎉 After an initial review, this PR looks good to us. Here's a summary: ✅ Linked to a verified issue (CORE-1395) Notes: The root cause is clear: Extracting the shared fields into A team member will do a final review before this is merged. We appreciate your patience! |
Summary
What — What changes are introduced in this PR?
Ensure the complete price context is passed when adding items to draft orders the same way we do when adding items to a cart.
Why — Why are these changes relevant or necessary?
Not passing the full context will make price rules targeting properties not present in said context to not execute.
How — How have these changes been implemented?
Pass the same fields for the pricing context when adding items to draft orders in the same way we do for the analog operation in carts.
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 CORE-1395