Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider levels as trial if some delay has been applied in level settings #35

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

mircobabini
Copy link
Member

Fixes #34.

@dparker1005
Copy link
Member

Although subscription delays are often used to give users a free trial of a membership level, I am hesitant to merge this particular change due to the effect that they will have on live sites using PMPro Subscription Delays.

One of the primary places where the pmpro_isLevelTrial() function is used is when deciding whether to send the checkout_paid email template or the checkout_trial email template after a users check out. If this change were merged, all sites that have customized the checkout_paid email template would then have to go and also update their checkout_trial email template, and users who check out before that update occurs will likely get the default PMPro trial email template.

That function is also used in the code of many of our gateways in order to determine whether the level's trial billing cycles, frequency, period, price, and limit should be sent. Since subscription delays do not use those fields, I could see this potentially causing issues in some gateways, or at least make things a bit more confusing there.

Finally, subscription delays are not just for trials. Many sites use this plugin to make all memberships start on the same day (January 1st as an example) and in this case, this "delay" would not be a trial but rather a shortening of a membership to enforce a specific membership schedule.

For all these reasons, I believe that this code would be better suited as a code recipe and used in cases where sites specifically want the checkout_trial email sent when a level has a subscription delay. Happy to continue discussing of you still think this should still be included though.

@mircobabini
Copy link
Member Author

mircobabini commented Mar 18, 2022

I was not aware of all these cases.

Finally, subscription delays are not just for trials. Many sites use this plugin to make all memberships start on the same day (January 1st as an example)

In that case we can probably add a check for is_numeric.

I think we should have a solid way to define if the user consumed a trial or not (for a certain membership to does not allow to resubscribe, or in generale if you want that trial in usable just once on the whole site).

Probably it's better to create an "Is trial" checkbox though, to avoid bad assumptions.
So... yeah, too risky to make assumptions with all those different cases out there.

I think we should keep this open for thoughts.

@mircobabini mircobabini reopened this Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pmpro_isLevelTrial returns false for subs delayed levels
2 participants