get_lifterlms_price_format()

Get a format string that can be passed to printf or sprintf to format prices as per user-defined price formatting settings


Description Description


Return Return

(string)


Top ↑

Source Source

File: includes/functions/llms.functions.currency.php

function get_lifterlms_price_format() {
	$pos    = get_option( 'lifterlms_currency_position', 'left' );
	$format = '%1$s%2$s';
	switch ( $pos ) {
		case 'left':
			$format = '%1$s%2$s';
			break;
		case 'right':
			$format = '%2$s%1$s';
			break;
		case 'left_space':
			$format = '%1$s %2$s';
			break;
		case 'right_space':
			$format = '%2$s %1$s';
			break;
	}
	return apply_filters( 'lifterlms_price_format', $format, $pos );
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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