LF_COURSEENROLLED::lf_course_enrolled( $user_id,  $product_id )

Validation function when the trigger action is hit


Parameters Parameters

$user_id

(Required)

$product_id

(Required)


Source Source

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

	public function lf_course_enrolled( $user_id, $product_id ) {

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


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

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