Is it possible to delete all trials associated with a version?Answered

We do not have different pricing associated with different versions, once a customer has purchased a subscription they get access to all new versions. Therefore on the limelm side, we just use a single version for the product.

However, for a promotion we would like to remove all free trials associated with a new release (and extend the free trial period from 10 days to 30). However, I can't see an option to delete trials on our existing limelm version. We could create a new version which would allow users to have a free trial even if they had one before. However, existing paid users would have to obtain a new license for the new version (and potentially juggle two license keys, if they want to use old versions). So this isn't really an option.

Having just seen https://wyday.com/forum/t/4335/new-major-version-resetting-trial-for-all-users/ I guess this is definitely not possible. As such, I'm using this post to lobby for this change as resetting free trials on a version seems like a natural feature to provide. 

Alternatively, it would be great if you could check the workaround described in that post can be implemented as below (without any unforseen pitfalls).

1) set the number of free trial days on our limelm version to 0
2) create a 30 day free trial extension with high of max uses and a final-use day far into the future.


try:
    ta.use_trial(verified=True)
    days_remaining = ta.trial_days_remaining(verified=True)

    if isinstance(days_remaining, int) and days_remaining > 0:
        return True
    else:
        return False

except ...
    

we could instead do:

```python
PROMOTION_TRIAL_EXTENSION = "the code"

try: 
    # will allways fail
	ta.use_trial(verified=True) 
except TurboActivateTrialExpiredError: 
	pass
try:
    # works the first time if the user had an expired free
    # trial before or not
    ta.extend_trial(
        PROMOTION_TRIAL_EXTENSION,
        verified=True,
    )
except TurboActivateError:
    pass

days_remaining = ta.trial_days_remaining(verified=True)

if isinstance(days_remaining, int) and days_remaining > 0:
    return True
else:
    return False

```
ago, edited ago
Answer

Yep, that's a perfectly reasonable use-case for trial extensions.

ago👍 1

Brilliant,thanks.

ago

Thanks Wyatt, quick follow up question on this:

We ended up having to do something (now using callbacks also) like:
 


try:
    ta.use_trial(verified=True, callback=some_function)
except:
    pass
    
try:
    ta.extend_trial(CODE, verified=True)
    # here we need to to ta.use_trial again otherwise checking the days remaining failed with TA_FAIL
    ta.use_trial(verified=True, callback=some_function)
except:
    ...

The question I have is on the registration of the callbacks. three cases of interest:

1) A user is already in a valid trial and we are extending it (for the first and only time). The callback is registered twice, both times on a successful use_trial.

2) The users original trial is complete, then the first use_trial will fail, we extend, then the second use_trial succeeds. In this case we have a callback registered to a failed use_trial and then in a successful use_trial.

3) A completely new user. The first use_trial fails and the second use_trial succeeds.

My question is to what happens to the callback registration under the hood - will the second use_trial call simply overwrite the first? That works well for use. But maybe the original callback registration can stay alive and still fire off when the rail ends (possibly leading to unexpected behavior). 

ago