diff --git a/webapp/channels/src/components/admin_console/billing/billing_summary/index.tsx b/webapp/channels/src/components/admin_console/billing/billing_summary/index.tsx
index e53bd72570..8f0d5c5c56 100644
--- a/webapp/channels/src/components/admin_console/billing/billing_summary/index.tsx
+++ b/webapp/channels/src/components/admin_console/billing/billing_summary/index.tsx
@@ -5,6 +5,7 @@ import React from 'react';
import {useSelector} from 'react-redux';
import {getSubscriptionProduct, checkHadPriorTrial, getCloudSubscription} from 'mattermost-redux/selectors/entities/cloud';
+import {cloudReverseTrial} from 'mattermost-redux/selectors/entities/preferences';
import {CloudProducts} from 'utils/constants';
@@ -27,17 +28,20 @@ type BillingSummaryProps = {
const BillingSummary = ({isFreeTrial, daysLeftOnTrial, onUpgradeMattermostCloud}: BillingSummaryProps) => {
const subscription = useSelector(getCloudSubscription);
const product = useSelector(getSubscriptionProduct);
+ const reverseTrial = useSelector(cloudReverseTrial);
let body = noBillingHistory;
const isPreTrial = subscription?.is_free_trial === 'false' && subscription?.trial_end_at === 0;
const hasPriorTrial = useSelector(checkHadPriorTrial);
- const showTryEnterprise = product?.sku === CloudProducts.STARTER && isPreTrial;
- const showUpgradeProfessional = product?.sku === CloudProducts.STARTER && hasPriorTrial;
+ const isStarterPreTrial = product?.sku === CloudProducts.STARTER && isPreTrial;
+ const isStarterPostTrial = product?.sku === CloudProducts.STARTER && hasPriorTrial;
- if (showTryEnterprise) {
+ if (isStarterPreTrial && reverseTrial) {
+ body = ;
+ } else if (isStarterPreTrial) {
body = tryEnterpriseCard;
- } else if (showUpgradeProfessional) {
+ } else if (isStarterPostTrial) {
body = ;
} else if (isFreeTrial) {
body = freeTrial(onUpgradeMattermostCloud, daysLeftOnTrial);
diff --git a/webapp/channels/src/packages/mattermost-redux/src/selectors/entities/preferences.ts b/webapp/channels/src/packages/mattermost-redux/src/selectors/entities/preferences.ts
index b2d3c1a672..b3f5d1f843 100644
--- a/webapp/channels/src/packages/mattermost-redux/src/selectors/entities/preferences.ts
+++ b/webapp/channels/src/packages/mattermost-redux/src/selectors/entities/preferences.ts
@@ -300,6 +300,10 @@ export function deprecateCloudFree(state: GlobalState): boolean {
return getFeatureFlagValue(state, 'DeprecateCloudFree') === 'true';
}
+export function cloudReverseTrial(state: GlobalState): boolean {
+ return getFeatureFlagValue(state, 'CloudReverseTrial') === 'true';
+}
+
export function appsSidebarCategoryEnabled(state: GlobalState): boolean {
return getFeatureFlagValue(state, 'AppsSidebarCategory') === 'true';
}