WordPress / WordPress/Learn

Future enhancement - WP REST API - Enable filtering of lessons by course

Open
#2,693 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Component] Learn Plugin [Type] Enhancement Priority - Low
Dominant language
PHP
Stars
333
Forks
127
Avg merge
1d 7h
Merged PRs (30d)
11

Description

Type of feedback

//dev

Description

Currently, we have two public WP REST API endpoints for courses and lessons. However, one cannot request all lessons that belong to a course.

The link between courses and lessons appears to be stored in a meta key, so it would be great to filter lessons by a course.

Here's an example of enabling this functionality.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the public /wp-json/wp/v2/courses and /wp-json/wp/v2/lessons endpoints and how the lesson-to-course meta key is registered. Use the linked REST API example as reference; the work is done when the lessons endpoint can filter results by course and returns only the matching lessons.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.