LLMS_Notification_View_Course_Track_Complete::set_merge_data( string $code )

Replace merge codes with actual values


Parameters Parameters

$code

(string) (Required) the merge code to ge merged data for


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/notifications/views/class.llms.notification.view.course.track.complete.php

	protected function set_merge_data( $code ) {

		switch ( $code ) {

			case '{{TRACK_TITLE}}':
				$track = new LLMS_Track( $this->notification->get( 'post_id' ) );
				$code  = $track->get_title();
				break;

			case '{{STUDENT_NAME}}':
				$code = $this->is_for_self() ? __( 'you', 'lifterlms' ) : $this->user->get_name();
				break;

		}

		return $code;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.