LLMS_AJAX_Handler::llms_save_membership_autoenroll_courses( array $request )

Save autoenroll courses list for a Membership


Parameters Parameters

$request

(array) (Required) $_POST data.


Top ↑

Return Return

(null|true)


Top ↑

Source Source

File: includes/class.llms.ajax.handler.php

		}

		// Not a membership.
		$membership = llms_get_post( $request['post_id'] );
		if ( ! $membership || ! is_a( $membership, 'LLMS_Membership' ) ) {
			return;
		}

		$courses = array_map( 'absint', (array) $request['courses'] );
		$membership->add_auto_enroll_courses( $courses, true );

		return true;

	}

	/**
	 * AJAX handler for creating and updating access plans via the metabox on courses & memberships
	 *
	 * @since 3.29.0


Top ↑

Changelog Changelog

Changelog
Version Description
3.30.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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