Courses (E3)
A built-in LMS. Two CPTs are registered:
| CPT | Slug | Used for |
|---|---|---|
omem_course | /courses/{slug}/ | Course landing pages (theme template aware) |
omem_lesson | /lessons/{slug}/ | Individual lesson pages (access-enforced) |
Neither CPT shows up in the standard WP admin (show_ui is false). Everything is managed from the OMembership admin.
Schema
Seven supporting tables:
wp_omem_courses -- id, post_id, title, settings, status
wp_omem_modules -- id, course_id, title, position, settings
wp_omem_lessons -- id, module_id, post_id, title, type, position, drip_rule, prerequisites
wp_omem_quizzes -- id, lesson_id, settings
wp_omem_quiz_questions -- id, quiz_id, position, type, prompt, options, correct, points
wp_omem_quiz_attempts -- id, quiz_id, user_id, started_at, submitted_at, score, passed, answers
wp_omem_progress -- user_id + lesson_id UNIQUE, status, progress_pct, completed_at
wp_omem_certificates -- user_id, course_id, issued_at, verification_token, pdf_attachment_idLesson types
video- typically a Vimeo / YouTube / self-hosted file URL stored insettingstext- WP block content via the linkedpost_idaudio- same shape as videodownload- downloadable asset (gated through the access engine)live- scheduled event (off-platform link)
Quizzes
Question types: multi, tf (true/false), short (short answer), file (upload). Each question carries a point value. OMembership_Quizzes::has_passed() checks attempts against the pass threshold stored in quiz settings.
Progress
Progress is keyed (user_id, lesson_id) UNIQUE. When progress.status flips to completed, omem/lesson/completed fires. When every lesson in a course is done, omem/course/completed fires and OMembership_Certificates::issue() mints a certificate with a 32-char verification_token.
Certificate verification
Activation adds a public rewrite: /certificate/{token}/. The token resolves to an HTML certificate page. PDF generation is wired through a filter so themes can plug mPDF or DOMPDF without dragging the dependency into the plugin core.

