Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Mix format

Uku Tahtef9ce7dbe26f
diff --git a/lib/plausible/billing/plans.ex b/lib/plausible/billing/plans.ex
index 90a1e8d4af..fe9f9d6c27 100644
--- a/lib/plausible/billing/plans.ex
+++ b/lib/plausible/billing/plans.ex
@@ -74,20 +74,20 @@ defmodule Plausible.Billing.Plans do
end
def subscription_quota("free_10k"), do: "10k"
+
def subscription_quota(product_id) do
case for_product_id(product_id) do
nil -> raise "Unknown quota for subscription #{product_id}"
product -> number_format(product[:limit])
-
end
end
def subscription_interval("free_10k"), do: "N/A"
+
def subscription_interval(product_id) do
case for_product_id(product_id) do
nil -> raise "Unknown interval for subscription #{product_id}"
product -> product[:cycle]
-
end
end