Skip to content
This repository was archived by the owner on Oct 9, 2024. It is now read-only.

Commit 9bc4da5

Browse files
committed
Fix check variant helper
1 parent 73da0be commit 9bc4da5

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"description": "ReactJS hooks for using Commerce.js with React projects",
1414
"main": "dist/index.js",
15-
"source": "src/index.js",
15+
"source": "src/index.ts",
1616
"repository": "https://github.com/chec/react-commercejs-hooks",
1717
"author": "Chec Platform Ltd.",
1818
"license": "BSD-3-Clause",

src/checkout/useCheckVariant.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ export default function useCheckVariant() {
1515
return commerce.checkout.checkVariant(
1616
checkout.id,
1717
lineItemId,
18-
{
19-
group_id: variantId,
20-
option_id: optionId,
21-
},
18+
{ options: [optionId] },
2219
).then((result: any) => {
2320
updateLive(result.live);
2421
return result;

0 commit comments

Comments
 (0)