Browse: Home / Functions /

learndash_get_price_formatted

learndash_get_price_formatted( mixed $price,  string $currency_code = '' )

Gets the price formatted based on the LearnDash global currency configuration.


Description #


Parameters #

$price

(mixed) (Required) The price to format.

$currency_code

(string) (Optional) The country currency code (@since 4.2.0).

Default value: ''


Return #

(string) Returns price formatted.


Source #

File: includes/payments/ld-payments-functions.php


Changelog #

Changelog
Version Description
4.2.0 Added $currency_code parameter.
4.1.0 Introduced.