One of the most requested multiple memberships workarounds is the ability to offer single courses for purchase. This article demonstrates how to sell single courses using Addon Packages with LearnDash.

Addon Package Demo: How to Make a Tree Fort Coure

Plugins Required

This setup requires three separate plugins and a code recipe I’m including below:

How to Set it Up

  1. In the WordPress admin, create a new page for each course you would like to sell “a la carte”. These pages serve as the “sales page” for the course and will not hold any of the actual course content.
  2. Set the “Price” for the course in the “PMPro Addon Package Settings” field.
  3. Set the Membership Levels that can make the purchase of the course via the “Require Membership” box. A member in these levels will not gain automatic access to the course—this sets the level(s) that a member must have or be assigned to at checkout in order to complete purchase. Levels assigned to an Addon Package can be paid or free.

After this is configured, implement the recipe below to enroll a member in the course after they complete checkout for the Addon Package.

The LearnDash + PMPro Code Recipe

This code recipe requires a PMPro Plus Account or higher.

View Membership Options

Adding the recipe to your website

To make this recipe to work for your site, you’ll need to update the $pmpro_addon_pages_for_courses array for each “page to course” relationship. The array accepts data in the format: {WP Post ID} => {Course ID}. Add an item to the array for each individual course you want to sell a la carte. This is the key step that associates your sales page with the course purchased.

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.

This recipe works independent of the Paid Memberships Pro Integration for LearnDash.

Ronald Huereca

This code recipe was written by our very own Ronald Huereca.