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
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.zipA 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
- Download or clone this repository
- Upload to
/wp-content/plugins/learndash-group-student-manager/ - 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
- Go to WordPress Admin → Plugins
- Find "LearnDash Group Student Manager"
- 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.
- Go to LearnDash → Groups → Edit Group
- Scroll to Group Access Settings
- Set Managed Students Limit to your desired number (e.g.,
5) - Check Use Fixed Limit checkbox
- 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.
- Go to WooCommerce → Products → Edit Product
- In the Product Data section (General tab), find LearnDash Group (Student Manager)
- Select the group this product grants access to
- 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
- Go to WooCommerce → Products → Add New
- Set up your product (name, price, etc.)
- In Product Data → General, find LearnDash Group (Student Manager)
- Select the corresponding LearnDash group
- Save
Step 2: Connect to CartFlows
- Create your CartFlows funnel as normal
- Add the WooCommerce product to your checkout step
- The plugin automatically detects orders from CartFlows
Step 3: Link in LearnDash (Optional)
- Go to LearnDash → Groups → Edit Group
- 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:
- Edit the Free Trial group
- Set Managed Students Limit =
5 - 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:
- Create WooCommerce product "Basic Plan"
- Link it to "Basic Group" in product settings
- 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:
- Fixed Limit (if enabled on group) → Uses group-wide limit for everyone
- Per-User Limit (from purchase) → Uses quantity from WooCommerce order
- Group Default Limit (if set) → Falls back to group setting
- 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_completedwoocommerce_order_status_processingwoocommerce_order_status_on-holdwoocommerce_payment_completewoocommerce_thankyou
CartFlows Hooks
cartflows_order_startedcartflows_order_completed
LearnDash Hooks
ld_added_group_access- Sets limit when user joins grouplearndash-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
- Check that the WooCommerce product has a group selected in LearnDash Group (Student Manager) dropdown
- Verify the order status is "Completed" or "Processing"
- 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
- Confirm user is logged in
- Confirm user is enrolled in the group
- 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.