WP Manifestindependent plugin directory
manifest / users / learndash-group-student-manager

LearnDash Group Student Manager

WordPress plugin for LearnDash that allows group members to add and manage students with WooCommerce/CartFlows seat-based licensing

by EdGuru · github.com/sarahprofile/learndash-group-student-manager · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/sarahprofile/learndash-group-student-manager/archive/refs/heads/main.zip

A WordPress plugin that allows enrolled group members to add and manage their own students in LearnDash groups, with WooCommerce and CartFlows integration for seat-based licensing.

Features

  • Student Management: Enrolled users can add students to groups they belong to
  • Seat-Based Licensing: Limit how many students each user can add based on purchase quantity
  • WooCommerce Integration: Automatically set student limits from order quantities
  • CartFlows Support: Works with CartFlows checkout funnels
  • Fixed Limits: Set permanent limits for specific groups (e.g., Free Trial = 5 students)
  • Auto User Creation: Automatically creates WordPress accounts for new students
  • Email Notifications: Sends welcome emails with login credentials
  • Student Tracking: Users can only manage students they personally added

Installation

Step 1: Upload Plugin Files

  1. Download or clone this repository
  2. Upload to /wp-content/plugins/learndash-group-student-manager/
  3. Your folder structure should be:
/wp-content/plugins/learndash-group-student-manager/
├── learndash-group-student-manager.php
├── README.md
└── assets/
    ├── script.js
    └── style.css

Step 2: Activate the Plugin

  1. Go to WordPress Admin → Plugins
  2. Find "LearnDash Group Student Manager"
  3. Click Activate

Configuration

Setting Up Student Limits

There are two ways to control how many students users can add:

Option 1: Fixed Group Limit (For Free Trial, Demo Groups, etc.)

Use this when ALL users in a group should have the same limit.

  1. Go to LearnDash → Groups → Edit Group
  2. Scroll to Group Access Settings
  3. Set Managed Students Limit to your desired number (e.g., 5)
  4. Check Use Fixed Limit checkbox
  5. Save the group
Setting Value Description
Managed Students Limit 5 Maximum students per user
Use Fixed Limit ✓ Checked Ignores purchase quantities

Option 2: Purchase-Based Limit (For Paid Groups)

Use this when the student limit should come from WooCommerce order quantity.

  1. Go to WooCommerce → Products → Edit Product
  2. In the Product Data section (General tab), find LearnDash Group (Student Manager)
  3. Select the group this product grants access to
  4. Save the product

Now when a customer purchases this product:

  • Quantity 1 = Can add 1 student
  • Quantity 6 = Can add 6 students
  • Quantity 10 = Can add 10 students

WooCommerce + CartFlows Setup

Step 1: Create Your Product

  1. Go to WooCommerce → Products → Add New
  2. Set up your product (name, price, etc.)
  3. In Product Data → General, find LearnDash Group (Student Manager)
  4. Select the corresponding LearnDash group
  5. Save

Step 2: Connect to CartFlows

  1. Create your CartFlows funnel as normal
  2. Add the WooCommerce product to your checkout step
  3. The plugin automatically detects orders from CartFlows

Step 3: Link in LearnDash (Optional)

  1. Go to LearnDash → Groups → Edit Group
  2. Add your CartFlows checkout URL to the group settings

How It Works

Customer Journey:
1. Customer visits CartFlows checkout
2. Selects quantity (e.g., 6 seats)
3. Completes purchase
4. Plugin automatically sets their student limit to 6
5. Customer can now add up to 6 students to the group

Usage

Shortcode

Add this shortcode to any page:

[ldgsm_student_form]

This displays:

  • All groups the user is enrolled in (as tabs)
  • Current student count and limit
  • Form to add new students
  • List of students they've added

Specific Group

To show only one group:

[ldgsm_student_form group_id="123"]

Automatic Display

The form also appears automatically on LearnDash group pages for enrolled users.


Example Scenarios

Scenario 1: Free Trial Group

Goal: Everyone gets exactly 5 students, no purchases involved.

Setup:

  1. Edit the Free Trial group
  2. Set Managed Students Limit = 5
  3. Check "Use Fixed Limit" = Yes

Result: All users in this group can add up to 5 students.


Scenario 2: Basic Plan (Purchased)

Goal: Customers buy seats, quantity determines limit.

Setup:

  1. Create WooCommerce product "Basic Plan"
  2. Link it to "Basic Group" in product settings
  3. Connect product to CartFlows checkout

Result:

  • Customer buys Quantity 3 → Can add 3 students
  • Customer buys Quantity 10 → Can add 10 students

Scenario 3: Multiple Groups

Goal: Different limits for different groups.

Setup: | Group | Limit Type | Limit | |-------|------------|-------| | Free Trial | Fixed | 5 | | Starter Plan | Purchase-based | From order qty | | Pro Plan | Purchase-based | From order qty | | Enterprise | Fixed | 100 |

Result: Each group respects its own limit configuration.


Admin Settings Reference

Group Settings (LearnDash → Groups → Edit)

Field Description
Managed Students Limit Maximum students per user. Set to 0 for unlimited.
Use Fixed Limit When checked, ALL users get the same limit (ignores purchases).

Product Settings (WooCommerce → Products → Edit)

Field Description
LearnDash Group (Student Manager) Select which group this product is linked to. Purchase quantity sets the student limit.

How Student Limits Work

Priority Order

The plugin checks limits in this order:

  1. Fixed Limit (if enabled on group) → Uses group-wide limit for everyone
  2. Per-User Limit (from purchase) → Uses quantity from WooCommerce order
  3. Group Default Limit (if set) → Falls back to group setting
  4. Unlimited → If no limits are configured

Example

Group: Pro Plan
- Fixed Limit: OFF
- Group Default Limit: 0 (unlimited)

User A: Purchased Quantity 6 → Limit = 6
User B: Purchased Quantity 12 → Limit = 12
User C: No purchase → Limit = Unlimited
Group: Free Trial
- Fixed Limit: ON
- Group Default Limit: 5

User A: Limit = 5 (always)
User B: Limit = 5 (always)
User C: Limit = 5 (always)
(Purchase quantities are ignored)

Supported Integrations

WooCommerce Hooks

The plugin listens to these order events:

  • woocommerce_order_status_completed
  • woocommerce_order_status_processing
  • woocommerce_order_status_on-hold
  • woocommerce_payment_complete
  • woocommerce_thankyou

CartFlows Hooks

  • cartflows_order_started
  • cartflows_order_completed

LearnDash Hooks

  • ld_added_group_access - Sets limit when user joins group
  • learndash-group-content - Displays the form

Database Storage

Meta Key Location Description
_ldgsm_student_limit Group Default student limit for group
_ldgsm_fixed_limit Group Whether to use fixed limit (on/off)
_ldgsm_user_limit_{user_id} Group Per-user limit from purchase
_ldgsm_students_by_{user_id} Group Array of student IDs added by user
_ldgsm_linked_group Product Which group the product links to
_ldgsm_purchased_students User Total purchased student count

Troubleshooting

Student limit not working after purchase

  1. Check that the WooCommerce product has a group selected in LearnDash Group (Student Manager) dropdown
  2. Verify the order status is "Completed" or "Processing"
  3. Check if the group has "Use Fixed Limit" enabled (this ignores purchases)

All groups showing same limit

This happens when "Use Fixed Limit" is accidentally enabled, or when the _ldgsm_purchased_students user meta is being applied to all groups.

Solution: Make sure only Free Trial/demo groups have "Use Fixed Limit" checked.

Form not appearing

  1. Confirm user is logged in
  2. Confirm user is enrolled in the group
  3. Check browser console for JavaScript errors

Requirements

  • WordPress 5.0+
  • PHP 7.2+
  • LearnDash LMS (active)
  • WooCommerce (for purchase-based limits)
  • CartFlows (optional, for funnel checkouts)

Changelog

Version 2.0.0

  • Added WooCommerce integration for seat-based licensing
  • Added CartFlows support
  • Added "Use Fixed Limit" option for groups
  • Added product-to-group linking in WooCommerce
  • Student limits now based on purchase quantity
  • Multiple order hooks for better compatibility

Version 1.0.0

  • Initial release
  • Add/remove students from groups
  • Automatic user creation
  • Email notifications

License

Developed for EdGuru LMS Platform. Compatible with LearnDash LMS.