From 3b19d0e783ebe885365a3fc7d07e44bc6b8ed9bf Mon Sep 17 00:00:00 2001 From: Emil Widlund Date: Wed, 19 Feb 2025 23:06:23 +0100 Subject: [PATCH] fix recurring product --- package.json | 2 +- src/product.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index dc26ddc..0514bc1 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/product.ts b/src/product.ts index ac9e2e8..74f8b98 100644 --- a/src/product.ts +++ b/src/product.ts @@ -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, };