diff --git a/app/Helpers/InstanceHelper.php b/app/Helpers/InstanceHelper.php index fba58bb906d..4bd1d4ee05e 100644 --- a/app/Helpers/InstanceHelper.php +++ b/app/Helpers/InstanceHelper.php @@ -29,6 +29,8 @@ public static function getNumberOfPaidSubscribers() */ public static function getPlanInformationFromConfig(string $timePeriod): ?array { + $timePeriod = strtolower($timePeriod); + if ($timePeriod != 'monthly' && $timePeriod != 'annual') { return null; } diff --git a/app/Http/Controllers/Settings/SubscriptionsController.php b/app/Http/Controllers/Settings/SubscriptionsController.php index 30351c11fe6..db7c7727051 100644 --- a/app/Http/Controllers/Settings/SubscriptionsController.php +++ b/app/Http/Controllers/Settings/SubscriptionsController.php @@ -41,7 +41,6 @@ public function index() ]); } - $planId = $account->getSubscribedPlanId(); try { $nextBillingDate = $account->getNextBillingDate(); } catch (StripeException $e) { @@ -55,7 +54,7 @@ public function index() } return view('settings.subscriptions.account', [ - 'planInformation' => InstanceHelper::getPlanInformationFromConfig($planId), + 'planInformation' => InstanceHelper::getPlanInformationFromConfig($subscription->name), 'nextBillingDate' => $nextBillingDate, 'subscription' => $subscription, 'hasInvoices' => $hasInvoices,