Give your customers the option to select a membership duration and offer a discount for a longer term. This is a great way to collect a larger up-front payment from members and offer an incentive to pay for membership in advance.

Screenshot of the Membership Checkout page with code recipe

About the Recipe

This code will add a “Membership Duration” dropdown field to your checkout page. Once selected, the member’s expiration date and initial payment amount will be updated accordingly.

In the code recipe, there is a 20% discount when selecting a 2-year membership duration and a 25% discount for selecting a 3-year membership duration. The code recipe serves as an example for what is possible, you can alter the recipe to remove the discount or adjust the discount to suit your business.

You will need to input the Level ID that you want this code recipe to apply to. Only select membership levels that are billed on a yearly basis otherwise this will conflict with other level billing periods. Add your Membership Level ID to 'levels' => array( 8 )

This code recipe requires the Register Helper Add On to be installed and activated. If you need help altering this code to suit your needs, feel free to get in touch with one of our Support Engineers on our Member Support Forum.

The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

Search this site for the payment plans tutorial, or add links to the level description to the other checkout pages, or customize the checkout page template using the docs on this site. Good luck.

Very nice addition to the checkout page.
What array number do I use if all of my membership options are on a 1 year basis?
What happens if there is a ‘recurring payment’ option? It’s conceivable that the user might check both options. Does this adjust for the extended initial payment period?

Hi @mauryg,

Thanks! You should be able to add your level ids separated by commas so 'levels' => array( 1,2,3 ). The recurring option should only be triggered once the membership expires. In this case, the expiration date gets pushed forward by the duration the member selects. In theory, the membership should then recur for the amount they selected.

Leave a Reply

For faster support related to issues on your specific site please open a ticket in our members support area.

Your email address will not be published. Required fields are marked *