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.


Top ↑

Return Return

(string)


Top ↑

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' ) );

Top ↑

Changelog Changelog

Changelog
Version Description
5.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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