LifterLMS REST API

LifterLMS REST API Version 1.0.0-beta.14

Breaking Change
  • LLMS_REST_Controller::prepare_links() now requires a second parameter, the WP_REST_Request for the current request. Any classes extending and overwriting this method must adjust their method signature to accommodate this change.
Bug Fixes
  • Fix issue causing response objects to unintentionally include keys of remapped fields. This error occurs only when extending core controllers and attempting to exclude core fields.

LifterLMS REST API Version 1.0.0-beta.10

  • Added text domain to i18n functions that were missing the domain.
  • Fixed setting roles instead of appending them when updating user, thanks @pondermatic!
  • Added a “trigger” parameter to enrollment-related endpoints.
  • Added llms_rest_enrollments_item_schema, llms_rest_prepare_enrollment_object_response, llms_rest_enrollment_links filter hooks.
  • Fixed return when the enrollment to be deleted doesn’t exist, returns 204 instead of 404.
  • Fixed ‘context’ query parameter schema, thanks @pondermatic!

LifterLMS REST API Version 1.0.0-beta.9

Updates
  • Added memberships controller, huge thanks to @pondermatic!

  • Added new filters:

  • llms_rest_lesson_filters_removed_for_response

  • llms_rest_course_item_schema

  • llms_rest_pre_insert_course

  • llms_rest_prepare_course_object_response

  • llms_rest_course_links

  • Improved validation when defining instructors for courses.

  • Improved performance on post collection listing functions.

Bug fixes
  • Ensure that a course instructor is always set for courses.
  • Fixed sales_page_url not returned in edit context.
  • In update_additional_object_fields() method, use WP_Error::$errors in place of WP_Error::has_errors() to support WordPress version prior to 5.1.

LifterLMS REST API Version 1.0.0-beta.8

  • Return links to those taxonomies which have an accessible rest route.
  • Initialize $prepared_item array before adding values to it. Thanks @pondermatic!
  • Fixed sales_page_type not returned as none if course’s sales_page_content_type property is empty.
  • Load webhook actions a little bit later, to avoid PHP warnings on first plugin activation.
  • Renamed sales_page_page_type and sales_page_page_url properties, respectively to sales_page_type and sales_page_url according to the specs.
  • Add missing quotes in enrollment/access default messages shortcodes.
  • Call set_bulk() llms post method passing true as second parameter, so to instruct it to return a WP_Error on failure.
  • Add missing quotes in enrollment/access default messages shortcodes.
  • sales_page_page_id and sales_page_url always returned in edit context.
  • Call set_bulk() llms post method passing true as second parameter, so to instruct it to return a WP_Error on failure.

LifterLMS REST API Version 1.0.0-beta.7

Updates
  • Added the following properties to the lesson schema and response object: drip_date, drip_days, drip_method, public, quiz.
  • Added the following links to lesson objects: prerequisite and quiz.
  • Use WP_Error::$errors in place of WP_Error::has_errors() to support WordPress version prior to 5.1.
  • Added llms_rest_lesson_item_schema, llms_rest_pre_insert_lesson, llms_rest_prepare_lesson_object_response, llms_rest_lesson_links filter hooks.
  • Course properties access_opens_date, access_closes_date, enrollment_opens_date, enrollment_closes_date are now nullable.
  • Course properties prerequisite and prerequisite_track can be be cleared (set to 0 to signify no prerequisite exists).
  • Added prerequisite validation for courses, if prerequisite is not a valid course the course prerequisite will be set to 0 and if prerequisite_track is not a valid course track, the course prerequisite_track will be set to 0.
Bug Fixes
  • Fixed lesson siblings link that was using the parent course’s id instead of the parent section’s id.
  • Fixed lesson parent link href, replacing ‘section’ with ‘sections’.
  • Fixed lesson progression callback name when defining the filters to be removed while preparing the item for response.
  • Fixed description of the post_id path parameter for student enrollments resources. Thanks @pondermatic.
  • Fixed section parent course object retrieval method when building the resource links.