Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Takes code from em_get_currency_formatted and filters said function so that it removes the decimal places from the formatted price.
- For information on implementing this snippet see this - http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
- */
- function my_em_custom_currency( $formatted_price, $price, $currency, $format ){
- $formatted_price = str_replace('@', em_get_currency_symbol(true,$currency), $format);
- $formatted_price = str_replace('#', number_format( $price, 0, get_option('dbem_bookings_currency_decimal_point','.'), get_option('dbem_bookings_currency_thousands_sep',',') ), $formatted_price);
- return $formatted_price;
- }
- add_filter('em_get_currency_formatted', 'my_em_custom_currency', 10, 4);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement