llms_get_enrollable_post_types()

Retrieve a list of post types which users can be enrolled into.


Return Return

(string[]) A list of post type names.


Top ↑

Source Source

File: includes/llms.functions.core.php

 */
function llms_get_enrollable_post_types() {

	/**
	 * Customize the post types which users can be enrolled into.
	 *
	 * This filter differs slightly from `llms_user_enrollment_status_allowed_post_types`. This filter
	 * determines which post types a user can be physically associated with through enrollment while
	 * `llms_user_enrollment_status_allowed_post_types` allows checking of user enrollment based on
	 * posts which are associated with a post type.
	 *
	 * @since 3.37.9
	 *
	 * @see llms_user_enrollment_status_allowed_post_types
	 *
	 * @param string[] $post_types Array of post type names.
	 */
	return apply_filters( 'llms_user_enrollment_allowed_post_types', array( 'course', 'llms_membership' ) );



Top ↑

Changelog Changelog

Changelog
Version Description
4.4.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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