0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Handled trial days on creating new tier

refs https://github.com/TryGhost/Team/issues/1724

- saves trial days in DB when creating a new tier
This commit is contained in:
Rishabh 2022-08-05 16:25:17 +05:30
parent 6ce3e8efd6
commit b03ec721a2

View file

@ -142,6 +142,7 @@ class ProductRepository {
* @param {StripePriceInput|null} data.yearly_price
* @param {string} data.product_id
* @param {string} data.stripe_product_id
* @param {number} data.trial_days
*
* @param {object} options
*
@ -186,6 +187,10 @@ class ProductRepository {
welcome_page_url: data.welcome_page_url
};
if (Reflect.has(data, 'trial_days')) {
productData.trial_days = data.trial_days;
}
const product = await this._Product.add(productData, options);
if (this._stripeAPIService.configured) {