Browse: Home / Hooks /

learndash_course_points_format_round

apply_filters( 'learndash_course_points_format_round',  int $decimals )

Filters course points format round decimal value.


Description #


Parameters #

$decimals

(int) the number of decimal digits to round to.


Source #

File: includes/ld-misc-functions.php


Examples #

Note: Extended code example below not guaranteed, you may need to consult with a developer

 <?php
/**
 * Example usage for learndash_course_points_format_round filter.
 */
add_filter(
	'learndash_course_points_format_round',
	function( $decimal_places = 1 ) {

		// Change the used decimal places to 2.
		$decimal_places = 2;

		// Always return the $decimal_places
		return $decimal_places;
	}
);