MPC_COURSEDONE::course_done( $data )

Validation function when the trigger action is hit


Parameters Parameters

$data

(Required)


Source Source

File: src/integrations/memberpress-courses/triggers/mpc-coursedone.php

	public function course_done( $data ) {

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

		$args = array(
			'code'    => $this->trigger_code,
			'meta'    => $this->trigger_meta,
			'post_id' => $data->course_id,
			'user_id' => $data->user_id,
		);

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