get_lifterlms_price_format()

Get a format string that can be passed to printf or sprintf to format prices


Description Description

The format string is created using user-defined price formatting settings.


Top ↑

Return Return

(string)


Top ↑

Source Source

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

164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
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.