LF_LESSONDONE::lf_lesson_completed( $user_id,  $lesson_id )

Validation function when the trigger action is hit


Parameters Parameters

$user_id

(Required)

$lesson_id

(Required)


Source Source

File: src/integrations/lifterlms/triggers/lf-lessondone.php

	public function lf_lesson_completed( $user_id, $lesson_id ) {

		if ( empty( $user_id ) ) {
			return;
		}



		$args = [
			'code'    => $this->trigger_code,
			'meta'    => $this->trigger_meta,
			'post_id' => $lesson_id,
			'user_id' => $user_id,
		];

		Automator()->maybe_add_trigger_entry( $args );
	}