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.

Banner graphic for How to Set up a One-Time Membership Level Trial

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.

Update the $trial_levels array on line 11 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.


Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?
YesNo