Skip to content

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

Remove exceptions for beta users

Uku Taht03e6ffaba5ed
diff --git a/lib/plausible/billing/billing.ex b/lib/plausible/billing/billing.ex
index d08793031b..b63a41129f 100644
--- a/lib/plausible/billing/billing.ex
+++ b/lib/plausible/billing/billing.ex
@@ -83,30 +83,12 @@ defmodule Plausible.Billing do
end
end
- def coupon_for(user) do
- if was_beta_user(user) do
- "8FE5AF26"
- end
- end
-
- def was_beta_user(user) do
- Timex.before?(user.inserted_at, ~D[2019-04-25])
- end
-
def trial_days_left(user) do
- if Timex.before?(user.inserted_at, ~D[2019-04-24]) do
- Timex.diff(~D[2019-05-25], Timex.today, :days) + 1
- else
- 30 - Timex.diff(Timex.today, user.inserted_at, :days)
- end
+ 30 - Timex.diff(Timex.today, user.inserted_at, :days)
end
def trial_end_date(user) do
- if Timex.before?(user.inserted_at, ~D[2019-04-25]) do
- ~D[2019-05-25]
- else
- Timex.shift(user.inserted_at, days: 30) |> NaiveDateTime.to_date
- end
+ Timex.shift(user.inserted_at, days: 30) |> NaiveDateTime.to_date
end
def usage(user) do
diff --git a/lib/plausible_web/templates/billing/_checkout_button.html.eex b/lib/plausible_web/templates/billing/_checkout_button.html.eex
index 3e9baffc4d..3865b025bc 100644
--- a/lib/plausible_web/templates/billing/_checkout_button.html.eex
+++ b/lib/plausible_web/templates/billing/_checkout_button.html.eex
@@ -1 +1 @@
-<button class="paddle_button button button-sm" data-theme="none" data-product="<%= Plausible.Billing.Plans.paddle_id_for_plan(@plan) %>" data-email="<%= @conn.assigns[:current_user].email %>" data-disable-logout="true" data-coupon="<%= Plausible.Billing.coupon_for(@conn.assigns[:current_user]) %>" data-passthrough="<%= @conn.assigns[:current_user].id %>" data-success="/billing/success">Select</button>
+<button class="paddle_button button button-sm" data-theme="none" data-product="<%= Plausible.Billing.Plans.paddle_id_for_plan(@plan) %>" data-email="<%= @conn.assigns[:current_user].email %>" data-disable-logout="true" data-passthrough="<%= @conn.assigns[:current_user].id %>" data-success="/billing/success">Select</button>
diff --git a/lib/plausible_web/templates/billing/upgrade.html.eex b/lib/plausible_web/templates/billing/upgrade.html.eex
index 9af421a56f..9d8173f244 100644
--- a/lib/plausible_web/templates/billing/upgrade.html.eex
+++ b/lib/plausible_web/templates/billing/upgrade.html.eex
@@ -23,9 +23,6 @@
</p>
<p class="py-2">
All plans are on a monthly basis, cancel any time.
- <%= if Plausible.Billing.was_beta_user(@conn.assigns[:current_user]) do %>
- As a beta user, you will get 33% off on all plans. The coupon will be applied at checkout.
- <% end %>
</p>
</div>
<div class="pt-8"></div>
diff --git a/lib/plausible_web/templates/email/trial_upgrade_email.html.eex b/lib/plausible_web/templates/email/trial_upgrade_email.html.eex
index 277f453bda..2f5cef7a60 100644
--- a/lib/plausible_web/templates/email/trial_upgrade_email.html.eex
+++ b/lib/plausible_web/templates/email/trial_upgrade_email.html.eex
@@ -7,9 +7,6 @@ Based on that we recommend you select the <%= suggested_plan_name(@pageviews) %>
<br /><br />
<%= link("Upgrade now", to: "https://plausible.io/billing/upgrade") %>
<br /><br />
-<%= if Plausible.Billing.was_beta_user(@user) do %>
- PS: Since you joined during the beta, you'll get 33% off at checkout.<br /><br />
-<% end %>
Have any questions? Just reply to this email to get in touch!
<br /><br />
<br /><br />