Skip to content

Commit

Permalink
fix: added data wrap to subs cart request (#248)
Browse files Browse the repository at this point in the history
* fix: added data wrap to subs cart request

* chore: updated changeset
  • Loading branch information
rostyk-kanafotskyy authored Sep 9, 2024
1 parent d9c98da commit 7358ff7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/sharp-toes-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@elasticpath/react-shopper-hooks": patch
---

fixed add subscription to cart request by including data object wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ export const useAddSubscriptionItemToCart = (
return useMutation({
mutationFn: async ({ additionalHeaders, ...req }) => {
const body = {
type: "subscription_item",
...req,
data: {
type: "subscription_item",
...req,
}
}

return client.request.send(
Expand Down

0 comments on commit 7358ff7

Please sign in to comment.