Skip to content

Commit

Permalink
fix recurring product
Browse files Browse the repository at this point in the history
  • Loading branch information
emilwidlund committed Feb 19, 2025
1 parent 160d0b5 commit 3b19d0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polar-migrate",
"version": "0.1.6",
"version": "0.1.7",
"license": "Apache-2.0",
"bin": "bin/cli.js",
"type": "module",
Expand Down
4 changes: 3 additions & 1 deletion src/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ export const createProduct = async (
const createParams: ProductCreate = {
name: productName,
prices: [price],
recurringInterval: resolveInterval(variant.attributes.interval),
recurringInterval: variant.attributes.is_subscription
? resolveInterval(variant.attributes.interval)
: null,
description: description,
organizationId: organization.id,
};
Expand Down

0 comments on commit 3b19d0e

Please sign in to comment.