LLMS_Engagements::get_trigger_hooks()

Retrieve a list of hooks that trigger engagements to be awarded.


Return Return

(string[])


Top ↑

Source Source

File: includes/class.llms.engagements.php

	protected function get_trigger_hooks() {

		$hooks = array(
			'lifterlms_access_plan_purchased',
			'lifterlms_course_completed',
			'lifterlms_course_track_completed',
			'lifterlms_lesson_completed',
			'lifterlms_product_purchased',
			'lifterlms_quiz_completed',
			'lifterlms_quiz_failed',
			'lifterlms_quiz_passed',
			'lifterlms_section_completed',
			'lifterlms_user_registered',
			'llms_rest_student_registered',
			'llms_user_added_to_membership_level',
			'llms_user_enrolled_in_course',
		);

		// If there are any actions registered to this deprecated hook, add it to the list.
		if ( has_action( 'lifterlms_created_person' ) ) {
			$hooks[] = 'lifterlms_created_person';
		}

		/**
		 * Filters the list of hooks which can trigger engagements to be sent/awarded.
		 *
		 * @since 2.3.0
		 *
		 * @param string[] $hooks List of hook names.
		 */
		return apply_filters( 'lifterlms_engagement_actions', $hooks );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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