medusa
medusa copied to clipboard
fix: allow addresses to be AddressPayload or string on DraftOrder creation
What
- Allows
shipping_addressandbilling_addressbe either anAddressPayloadorstringas part of the create draft order endpoint props.
How
- Implements the same patterns as used for the similar Cart endpoints.
Why
The endpoint was using an old pattern for switching between addresses being either ids or payloads, which resulted in billing_address not being added during the creation process if it was not passed as an id.
Also
- Fixes the wrong payload types being used in js/react clients.
⚠️ No Changeset found
Latest commit: 87338b6ba5e985b52195cf8bf67853d3390966ca
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Can I get you to merge in latest from develop and resolve conflicts?
LGTM! Pending @olivermrbl for final approval 👍