@automattic/calypso-products
Version:
This module contains information about the various products sold within calypso, such as product slugs, plan intervals, etc.
9 lines • 547 B
JavaScript
import { camelOrSnakeSlug } from './camel-or-snake-slug';
import { PRODUCT_AKISMET_FREE, PRODUCT_AKISMET_ENTERPRISE_YEARLY } from './constants/akismet';
// AKISMET_ENTERPRISE_YEARLY has a $0 plan for nonprofits, so we need to check the amount
// to determine if it's free or not.
export function isAkismetFreeProduct(product) {
return (PRODUCT_AKISMET_FREE === camelOrSnakeSlug(product) ||
(PRODUCT_AKISMET_ENTERPRISE_YEARLY === camelOrSnakeSlug(product) && product.amount === 0));
}
//# sourceMappingURL=is-akismet-free-product.js.map