LF_QUIZATTEMPTED::lf_quiz_attempted( string $user_id, string $quiz_id, object $quiz_obj )

Validation function when the trigger action is hit


Parameters Parameters

$user_id

(string) (Required) .

$quiz_id

(string) (Required) .

$quiz_obj

(object) (Required) .


Source Source

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

	public function lf_quiz_attempted( $user_id, $quiz_id, $quiz_obj ) {

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



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

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