rpress_format_amount()

Author: bibhu 15 views

This function can be used to format a given price. It will return the result formatted to the correct number of decimals.

echo rpress_format_amount( 9.5 );

You could combine it with rpress_get_fooditem_price() to return the formatted price for any fooditem:

echo rpress_format_amount( rpress_get_fooditem_price( $fooditem_id ) );

If you wish to include a currency symbol you can filter the output with rpress_currency_filter.

echo rpress_currency_filter( rpress_format_amount( rpress_get_fooditem_price( $fooditem_id ) ) );