Warning: This method has been deprecated. There is not a replacement instead.
LLMS_AJAX_Handler::add_lesson_to_course( array $request )
Add a lesson to a course
Parameters Parameters
- $request
-
(array) (Required) $_POST data.
Return Return
(string)
Source Source
File: includes/class.llms.ajax.handler.php
if ( empty( $raw_plan_data ) ) {
continue;
}
$raw_plan_data = wp_unslash( $raw_plan_data );
if ( ! empty( $raw_plan_data['id'] ) ) {
$existing_plan = llms_get_post( absint( $raw_plan_data['id'] ) );
if ( ! $existing_plan || ! is_a( $existing_plan, 'LLMS_Access_Plan' ) ) {
$errors[] = new WP_Error( 'invalid-plan', esc_html__( 'Invalid access plan ID.', 'lifterlms' ) );
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 5.7.0 | Introduced. |