- Fixes security issue where student and instructor REST APIs can be used to modify roles incorrectly. Thanks @shark3y!
- Removes the unavailable quiz resource link from the lessons resource until the quiz resource is added.
- Show only instructor and student roles in the instructor and student list responses by default.
- Update the processed flag to use all arguments. #2568
- Adds additional security checks and escaping.
includes/abstracts/class-llms-rest-posts-controller.php
- Fix fatals when searching for llms post type based resources but the query post type parameter is forced to be something else. includes/models/class-llms-rest-webhook.php
- Remove the processed flag as the ActionScheduler prevents multiple additions of the same hook.
- Avoid PHP fatal when searching for courses/memberships but the query post type parameter is forced to a different post type. e.g. all post types except
postexcluded from search results. #299
- Rebuild and re-release to avoid including unnecessary heavy files.
- Replaced use of deprecated
strftime(). - Replaced use of the deprecated
FILTER_SANITIZE_STRINGconstant.
- Fixed unit tests on WordPress 6.2.
- Allow all the resources to be extended using
register_rest_field(). #157 - Added the ability for all the
WP_PostandWP_Userbased resources to manage custom meta registered viaregister_meta(). #157 - Added
llms_rest_{$object_type}_item_schemathat will allow filtering any resource schema. Additional schema fields, added viaregister_rest_field(), are not included. #157 - Added
llms_rest_allow_filtering_{$object_type}_item_schema_to_add_fieldsfilter hook. It allows adding additional fields using the filter hookllms_rest_{$object_type}_item_schemawithout warnings. By default additional fields should be added viaregister_rest_field(). #157 - Deprecated
llms_rest_enrollments_item_schemaandllms_rest_membership_item_schemafilter hooks in favor ofllms_rest_$object_type_item_schemawhere the object type is, respectively, equal to 'students-enrollments' and 'llms-membership'. #157
- Cache results of get_item_schema on controller instances for performance. Additional schema fields, added via
register_rest_field(), are not cached. #73
- Removed the extra parameter passed to
LLMS_Student::enroll()during status updates. #278 - Fixed an issue that produced the enrollment of the current user into a course when they were trying to enroll an user with ID 0. #308
- The LifterLMS Core minimum required version has been raised to version 7.0.2. #308
- Stop returning an error when updating resource properties with a value equal to the saved one. #222, #289
- Fixed reference to a non-existent schema property, visibiliy in place of visibility, when updating/adding an access plan.
- Fixed issue when updating a free access plan. #267
- Fixed issue causing the access plan
availability_restrictionsproperty to always return an empty array. #269 - Fixed issue that prevented updating the access plan
redirect_forcedproperty. #271 - Fixed issue updating access plans when there are 6 (max) plans associated with a course/membership. #272
- Replaced call to deprecated
LLMS_Section::get_parent_course()withLLMS_Section::get( 'parent_course' ). - Replaced the calls to the deprecated
LLMS_Lesson::get_parent_course()method withLLMS_Lesson::get( 'parent_course' ). - Replaced deprecated
llms_user_removed_from_membership_levelaction hook withllms_user_removed_from_membership.
- The LifterLMS Core minimum required version has been raised to version 6.0.0-alpha.1.
- Renamed
LLMS_REST_API_Keys_QueryandLLMS_REST_Webhooks_Querypreprare_query()methods toprepare_query. gocodebox/lifterlms#859
- Post based resources like couress, memberships, section, lessons... are now searchable.
- Fixed an issue that generated a PHP Fatal when retrieving the list of access plans if logged in as administrator.
- Fixed the access plan's
access_expiresproperty format not respecting the specs (Y-m-d H:i:s). - Fixed an issue that made the access plan's properties
sale_date_startandsale_date_endto be returned as empty.
- Added collection filtering by post status for courses, lessons, and memberships.
- Added Access Plan resource and endpoint.
- Provide a more significant error message when trying to delete an item without permissions.
- Use
WP_Httpconstants in favor of integers when referencing HTTP status codes.
- Fixes localization issues where a singular name was used in favor of the expected plural form.
- Fixed issues where an error object was not properly returned when expected
- Fixed call to undefined function
llms_bad_request_error(), must bellms_rest_bad_request_error(). - Fixed access plans resource link.
- Fixed wrong trigger retrieved when multiple trigger were present for the same user/post pair on Student Enrollment resources.
- Bugfix: Fixed an issue with webhooks causing a failed webhook to cause other webhooks to stop triggering.
- Update: Added improved localization methods when running as a standalone plugin.
- Method
LLMS_REST_Webhook::is_pending()has been removed. - Database column
pending_deliveryon thelifterlms_rest_webhookstable (and related model properties) have been deprecated and scheduled for removal.
- Improved performance of various database queries.
- Bugfix: Created lessons will now have the derivative
course_idproperty set according to the ID of the lesson's parent section. - Bugfix: The
course_idproperty of lessons is now properly marked as read-only.
LLMS_REST_Controller::prepare_links()now requires a second parameter, theWP_REST_Requestfor the current request. Any classes extending and overwriting this method must adjust their method signature to accommodate this change.
- 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.
- Bugfix: Fixed error response messages on the instructors endpoint.
- Bugfix: Fixed student progress deletion endpoint issues preventing progress from being fully removed.
- Fix: Prevent infinite loops encountered when invalid API keys are utilized.
- Fix: Add an action used to fire LifterLMS core engagement and notification emails
- Feature: Added the ability to filter student and instructor collection list requests by various user information fields.
- Bugfix: Correctly store user
billing_postcodemeta data. - Bugfix: Fixed issue preventing course.created (and other post.created) webhooks from firing.
- 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_linksfilter hooks. - Fixed return when the enrollment to be deleted doesn't exist, returns
204instead of404. - Fixed 'context' query parameter schema, thanks @pondermatic!
-
Added memberships controller, huge thanks to @pondermatic!
-
Added new filters:
llms_rest_lesson_filters_removed_for_responsellms_rest_course_item_schemallms_rest_pre_insert_coursellms_rest_prepare_course_object_responsellms_rest_course_links
-
Improved validation when defining instructors for courses.
-
Improved performance on post collection listing functions.
- Ensure that a course instructor is always set for courses.
- Fixed
sales_page_urlnot returned ineditcontext. - In
update_additional_object_fields()method, useWP_Error::$errorsin place ofWP_Error::has_errors()to support WordPress version prior to 5.1.
- Return links to those taxonomies which have an accessible rest route.
- Initialize
$prepared_itemarray before adding values to it. Thanks @pondermatic! - Fixed
sales_page_typenot returned asnoneif course'ssales_page_content_typeproperty is empty. - Load webhook actions a little bit later, to avoid PHP warnings on first plugin activation.
- Renamed
sales_page_page_typeandsales_page_page_urlproperties, respectively tosales_page_typeandsales_page_urlaccording to the specs. - Add missing quotes in enrollment/access default messages shortcodes.
- Call
set_bulk()llms post method passingtrueas 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_idandsales_page_urlalways returned in edit context.- Call
set_bulk()llms post method passingtrueas second parameter, so to instruct it to return a WP_Error on failure.
- 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:
prerequisiteandquiz. - Use
WP_Error::$errorsin place ofWP_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_linksfilter hooks. - Course properties
access_opens_date,access_closes_date,enrollment_opens_date,enrollment_closes_dateare now nullable. - Course properties
prerequisiteandprerequisite_trackcan be be cleared (set to0to signify no prerequisite exists). - Added prerequisite validation for courses, if
prerequisiteis not a valid course the courseprerequisitewill be set to0and ifprerequisite_trackis not a valid course track, the courseprerequisite_trackwill be set to0.
- Fixed lesson
siblingslink that was using the parent course's id instead of the parent section's id. - Fixed lesson
parentlink 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_idpath parameter for student enrollments resources. Thanks @pondermatic. - Fixed section parent course object retrieval method when building the resource links.
- Fix issue causing certain webhooks to not trigger as a result of action load order.
- Change "access_plans" to "Access Plans" for better human reading.
- Load all required files and functions when authentication is triggered.
- Access
$_SERVERvariables viafilter_varinstead ofllms_filter_inputto work around PHP bug https://bugs.php.net/bug.php?id=49184.
- Load authentication handlers as early as possible. Fixes conflicts with numerous plugins which load user information earlier than expected by the WordPress core.
- Harden permissions associated with viewing student enrollment information.
- Returns a 400 Bad Request when invalid dates are supplied.
- Student Enrollment objects return student and post id's as integers instead of strings.
- Fixed references to an undefined function.
- Better expose that API Keys are never shown again after the initial creation.
- Allow downloading of API Credentials as a
.txtfile. - Add
requiredproperties to required fields.
- Added the ability to CRUD webhooks via the REST API.
- Conditionally throw
_doing_it_wrongon server controller stubs. - Improve performance by returning early when errors are encountered for various methods.
- Utilizes a new custom property
show_in_llms_restto determine if taxonomies should be displayed in the LifterLMS REST API. - On the webhooks table the "Delivery URL" is trimmed to 40 characters to improve table readability.
- Fixed a formatting error when creating webhooks with the default auto-generated webhook name.
- On the webhooks table a translatable string is output for the status instead of the database value.
- Fix an issue causing the "Last" page pagination link to display for lists with 0 possible results.
- Don't output the "Last" page pagination link on the last page.
- Filter course taxonomies by the
publicproperty instead of theshow_in_restproperty. - Fixed bug preventing async webhooks from being delivered properly.
- Only load the main plugin function when loading the main plugin file. Fixes issue when running plugin alongside LifterLMS core with bundled API.
- Initial public beta release.