Banner for Advanced Code Recipe Tutorial for Paid Memberships Pro

Some membership sites want to offer a limited period trial before the full subscription begins. In this tutorial, we cover how to add a 30 day trial (free or for fee) to a membership with an annual recurring subscription.

Variable Length Trials and Gateway Limitations

While the subscription options with most payment gateways can be pretty flexible, most gateways are limited in how they allow variable length trial periods—specifically a trial period that is shorter or longer than what the recurring payment term will be.

For example, you can’t have an annual subscription to a membership level that also has a 30 day trial. So how do we get around this gateway limitation?

About the Subscription Delays Add On

In Paid Memberships Pro, we offer the Subscription Delays Add On to allow shorter trial periods on recurring plans—and the trial can be free or charge a reduced one time fee.

How does this work? we ignore native “trial” fields in the gateway APIs and instead set up an annual subscription that begins 30 days out. This can be achieved right in the Subscription Delays settings.

The code recipe below works without Subscription Delays and we are leaving it here as an archive so that developers can other methods to customize PMPro.

This content requires a premium membership plan.