Skip to main content

App overlay for downgraded users

Add overlay for users who don’t pay, but have premium features enabled (reuse the overlay from https://powrtrak.atlassian.net/browse/PM-7956 )

Scenario: Start storing enabled premium features in apps table when users use them in a separate column

Given a user creates a new app

When they enable premium feature in their app

Then write the enabled premium feature to apps table in a new column

Praneeta’s initial thoughts (still in discussion):

In the handlechangecomplete we check if the feature is a premium feature, this way we know if the feature was premium and at what level exactly at the point the user used the feature. \ We should reuse the unblock premium logic.

When user adds a feature which is a premium feature, we should add it to the array of premium features, when the user deletes it, remove the feature. \ Unblock premium currently empties out the array when the user upgrades, but this array should not be deleted.

alt_text \ There is a disadvantage to storing this data in duplicated way, however if we don’t do so - we don’t have the translated display name and requiredPlan for that user (wix, tier etc may change what the required plan is, so best to capture at the time of use)

Having all that data, we can be specific about the premium features the user is continuing to use. \

alt_text \

This array should be stored on app_infos table? \ Or create a new table? This record will be updated when app updates. We will use this on views controller for owners only with downgraded subscriptions.

Scenario: Remove premium features from record when paid feature is disabled

Given a user with an app record that stores paid features

When they disable premium feature in their app

Then delete the premium feature from a record in apps table

Scenario: Show overlay when no subscription

Given a user with an app record that stores paid features

When they open their published plugin on their website

And they are the owners of the plugin (Show only to them)

And their platform is not Wix

And they don’t have a paid subscription/active trial for that app or app_type = nil

And they had a paid subscription before on that app or with app_type = nil

Then the user should see a darkened overlay with text:

“Your POWr subscription was cancelled - please upgrade or remove advanced features”

And a button: Upgrade

And a text in the bottom “Only you can see this”

Scenario: Clicking a button

Given a user

Who sees overlay

When they click on Upgrade

Then send them to powr.io/pricing?app_type={{app_type}}

Scenario: When to stop showing overlay

Given a user

When they remove paid features

Or when they upgrade

Then stop showing the overlay