LLMS_REST_Courses_Controller::prepare_item_for_database( WP_REST_Request $request )

Prepares a single post for create or update.


Description Description


Parameters Parameters

$request

(Required) Request object.


Top ↑

Return Return

(array|WP_Error) Array of llms post args or WP_Error.


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/server/class-llms-rest-courses-controller.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.9 Added llms_rest_pre_insert_course filter hook.
1.0.0-beta.8 Renamed sales_page_page_type and sales_page_page_url properties, respectively to sales_page_type and sales_page_url according to the specs.
1.0.0-beta.7 access_opens_date, access_closes_date, enrollment_opens_date, enrollment_closes_date treated in @see update_additional_object_fields() method so to better handle the update of the course's properties time_period and enrollment_period whose values are derived from them and need to be passed to $course->set_bulk() only if they differ from their current values, otherwise we'd get a WP_Error which the consumer cannot avoid having no direct control on those properties. Made access_opens_date, access_closes_date, enrollment_opens_date, enrollment_closes_date nullable.
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.