dozent_course_is_free( null $course = null )

Determine if a course is free


Description

The course is free but users need to get logged-in and enrolled in order to access the content.

Example usage:

$is_free_course = dozent_course_is_free( $course );

See also


Parameters

$course

(null) (Optional)

Default value: null


Return

(mixed|void)


Source

File: includes/conditional-functions.php

	function dozent_course_is_free( $course = null ) {

		$is_free = dozent_get_course_price_type( $course ) === 'free';

		/**
		 * Filter the return value of dozent_course_is_free(); function
		 *
		 * @since DozentLMS 1.0.0
		 *
		 * @param  bool  $is_free  Determine if the course is free
		 * @param  int|object  $course  Post object
		 */

		return apply_filters( 'dozent_course_is_free', $is_free, $course );
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.