-
Notifications
You must be signed in to change notification settings - Fork 37
Wiki createDiscount function missing isLimitedToProducts option #136
Copy link
Copy link
Open
Description
Hi! I just created a discount using the wiki page: https://github.com/lmsqueezy/lemonsqueezy.js/wiki/Discounts#usage
I found that the discount was not limited to certain products, as the variantIds configuration option would suggest.
When adding isLimitedToProducts: true it works fine.
It should probably be also listed in the example, since most users would expect the coupon to be limited, when variantIds are provided.
Current
const { statusCode, error, data } = await createDiscount({
name: 'TestDiscount',
amount: 50,
amountType: 'percent',
storeId: 123456,
variantIds: [345678, 456789],
});Proposed
const { statusCode, error, data } = await createDiscount({
name: 'TestDiscount',
amount: 50,
amountType: 'percent',
storeId: 123456,
variantIds: [345678, 456789],
isLimitedToProducts: true,
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels