Use this recipe to mark one or more membership levels as a one time trial. New members will be able to complete registration for the one time trial level. If they attempt to renew the trial level, a message will be shown that their one time trial has already been used. We recommend this method for sites looking to add a “no credit card required” trial option.
Note that this method will only keep the same user from abusing your trial level and completing multiple checkouts. People can still reuse a trial if they sign up with a new email address and create another user account on your site.
The Code Recipe
Adding the Recipe to Your Website
You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.
$trial_levels array on line 12 to a single level ID or a comma-separated list of the level IDs for your one time trial levels. This code will add a custom
user_meta value when a user gains the trial level and then block that user from renewing or reusing the trial.
Code Author: Andrew
Andrew is a Product Manager at Paid Memberships Pro. He manages development for several of our Add Ons and contributes to the development of the core PMPro plugin.