Skip to content

Commit 3b19d0e

Browse files
committed
fix recurring product
1 parent 160d0b5 commit 3b19d0e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "polar-migrate",
3-
"version": "0.1.6",
3+
"version": "0.1.7",
44
"license": "Apache-2.0",
55
"bin": "bin/cli.js",
66
"type": "module",

src/product.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ export const createProduct = async (
122122
const createParams: ProductCreate = {
123123
name: productName,
124124
prices: [price],
125-
recurringInterval: resolveInterval(variant.attributes.interval),
125+
recurringInterval: variant.attributes.is_subscription
126+
? resolveInterval(variant.attributes.interval)
127+
: null,
126128
description: description,
127129
organizationId: organization.id,
128130
};

0 commit comments

Comments
 (0)