LP_COURSEDONE::lp_course_done( $course_id,  $user_id,  $result )

Validation function when the trigger action is hit


Parameters Parameters

$course_id

(Required)

$user_id

(Required)

$result

(Required)


Source Source

File: src/integrations/learnpress/triggers/lp-coursedone.php

	public function lp_course_done( $course_id, $user_id, $result ) {

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



		$args = [
			'code'    => $this->trigger_code,
			'meta'    => $this->trigger_meta,
			'post_id' => intval( $course_id ),
			'user_id' => $user_id,
		];

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