learndash/set-enrollment-date sets the date a learner’s access to a course began.
It is not a cosmetic field.
At a glance
| Ability | learndash/set-enrollment-date |
| Toolset | LearnDash — toolset/learndash |
| Group | LearnDash › Enrolment & Access |
| Requires | AcrossAI Pro, plus LearnDash LMS active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Pro 0.9.16 and later |
Two things are computed from this date
Drip-feed lesson release is the first. A lesson set to appear thirty days after enrolment appears thirty days after this date, so backdating an enrolment by two months releases everything at once.
Access expiry is the second. A course with a ninety-day access window expires ninety days after this date — so backdating far enough expires access immediately, and the learner loses the course as a result of what looked like a record correction.
The response reports the recomputed expiry and whether access is now expired, which is the only warning before somebody notices.
Both consequences are legitimate uses as well as accidents: releasing a drip-fed course to a learner who joined late is exactly this operation.
Accepts a Unix timestamp or a UTC date string such as 2026-01-31 or 2026-01-31 09:00:00.
The learner must already be enrolled. Enrol first.
Idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
learner | string | integer | Yes | User ID, login or email. |
course_id | integer | Yes | The course. |
date | string | integer | Yes | A Unix timestamp, or a UTC date string. |
What comes back
| Name | Type | What it is |
|---|---|---|
access_from | string | The date as stored. |
expires | string | The recomputed expiry. |
expired | boolean | Whether access is now expired. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Backdate this learner’s enrolment to when they actually started.
It resolves to one call:
{
"ability": "learndash/set-enrollment-date",
"parameters": {
"learner": "sam@example.com",
"course_id": 412,
"date": "2026-01-31"
}
}Worth knowing
- Drip-feed release and access expiry are both computed from this date.
- Backdating can release everything at once, or expire access immediately.
- The response reports the recomputed expiry — read it.
- The learner must already be enrolled.
Related abilities
- LearnDash Get Access Info — check the current dates
- LearnDash Get Lesson — the drip settings this feeds
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category