dozent_course_price( null $course = null )

Get the course formatted price.


Description

Append or prepend the currency sign, return free text if there is no course price

Example usage:

$course_formatted_price = dozent_course_price( $course );

See also


Parameters

$course

(null) (Optional)

Default value: null


Return

(mixed|void)


Source

File: includes/course-functions.php

	function dozent_course_price( $course = null ) {

		$course = dozent_get_course( $course );
		$price  = dozent_get_course_price( $course );

		if ( ! $price ) {

			/**
			 * Filter course price free text
			 *
			 * @since DozentLMS 1.0.0
			 *
			 * @param  string  $free_text  Free Text
			 * @param  object  $course  Course Object
			 */

			$price = apply_filters( 'dozent_course_price_free_text', __( 'Free', 'dozent' ), $course );
		}

		/**
		 * Filter the course formatted price
		 *
		 * @since DozentLMS 1.0.0
		 *
		 * @param  string  $price  Course Price Formatted
		 * @param  object  $course  Course Object
		 */

		return apply_filters( 'dozent_course_price', $price, $course );
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.