diff --git a/lib/plausible_web/components/billing/plan_box.ex b/lib/plausible_web/components/billing/plan_box.ex index 10d1094f2ce0..d0a668360e33 100644 --- a/lib/plausible_web/components/billing/plan_box.ex +++ b/lib/plausible_web/components/billing/plan_box.ex @@ -275,7 +275,7 @@ defmodule PlausibleWeb.Components.Billing.PlanBox do trial_active_or_ended_recently? = not invited_user? && - Plausible.Teams.Adapter.Read.Teams.trial_days_left(current_user) <= 10 + Plausible.Teams.Adapter.Read.Teams.trial_days_left(current_user) >= -10 limit_checking_opts = cond do diff --git a/test/plausible_web/live/choose_plan_test.exs b/test/plausible_web/live/choose_plan_test.exs index ba1be2894bb2..bd0271966d52 100644 --- a/test/plausible_web/live/choose_plan_test.exs +++ b/test/plausible_web/live/choose_plan_test.exs @@ -350,6 +350,7 @@ defmodule PlausibleWeb.Live.ChoosePlanTest do user |> Plausible.Auth.User.changeset(%{trial_expiry_date: Timex.shift(Timex.today(), days: -11)}) |> Repo.update!() + |> Plausible.Teams.sync_team() generate_usage_for(site, 11_000)