feat: Dont show cancel path if lifetime subscription#4755
Merged
Conversation
vegaro
reviewed
Feb 3, 2025
vegaro
reviewed
Feb 3, 2025
vegaro
reviewed
Feb 3, 2025
vegaro
requested changes
Feb 6, 2025
vegaro
approved these changes
Feb 7, 2025
vegaro
left a comment
Member
There was a problem hiding this comment.
Another case I am thinking we shouldn't show the cancel path is if the product is a promotional. To detect a promotional, I've normally checked for the prefix of the product identifier. To test it, you can grant your user a promotional in the dashboard
Feel free to merge this and address that in another PR
Member
Author
|
@vegaro I'll add another ticket and apply that too |
facumenzella
added a commit
to RevenueCat/purchases-android
that referenced
this pull request
Feb 12, 2025
### Motivation CANCEL should not be shown if the product is a lifetime product. ### Description This PR follows the same logic as Android, and filters out CANCEL if the product is lifetime: 1. Check entitlement 2. Subscription is false 3. Non subscription is true See RevenueCat/purchases-ios#4755
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Display only the paths that are relevant to the subscription
Description
Doing this in the backend requires some extra work, so for now we'll handle it in the client.
ManageSubscriptionsViewModelhas the relevant change. The other changes are just removing some unnecessary code, and re-organising stuff.