Skip to content

Membership Sync

You never add students to a forum by hand. LearnDash enrollment is the source of truth, and the plugin mirrors it into a wpForo usergroup in real time.

The first time a forum needs a private/public-read usergroup, the plugin:

  1. Creates one wpForo usergroup for the course, named LD Course {id}: {title}, cloning capabilities from the built-in Registered group.
  2. Adds that group to every existing forum’s permissions at no access by default, so it is opt-in per forum.
  3. Rebuilds the linked forum’s permissions so the new group can read and post.
  4. Backfills every current LearnDash enrollee of the course into the group.

One usergroup is created per course and reused across every forum and board that course is linked to.

The plugin listens to LearnDash’s enrollment events and updates the usergroup immediately:

Event Result
Student gains course access (admin, purchase, WP-CLI) Added to the course usergroup
Student loses course access Removed from the course usergroup
Student added to a LearnDash group Added to the usergroup of every course that group enrolls
Student removed from a LearnDash group Removed from those usergroups

Because membership is a wpForo usergroup, a student enrolled in a course that is linked to forums on several boards is unlocked everywhere in a single operation.

There is no separate “rescan” button. Saving the mapping — on either the course edit screen or the forum edit screen — triggers a full reconcile for that forum: it rebuilds the permissions, makes sure the usergroup exists, and backfills every current enrollee. If enrollment ever looks out of step, open the course or forum and hit Save/Update.

  • New wpForo profiles are created on demand, so a student who has never visited the forum before is still synced correctly.
  • Membership uses wpForo secondary usergroups, so it never overwrites a user’s primary group or their other roles.