Advertisement
eventsmanager

Pricing Remove Decimal

Jun 6th, 2013
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. function em_mod_remove_decimal($formatted_price, $price, $currency, $format){
  2. if(!$format) $format = get_option('dbem_bookings_currency_format','@#');
  3. if(!$currency) $currency = get_option('dbem_bookings_currency');
  4. $formatted_price = str_replace('@', em_get_currency_symbol(true,$currency), $format);
  5. $formatted_price = str_replace('#', number_format( $price, 0, '', get_option('dbem_bookings_currency_thousands_sep',',') ), $formatted_price);
  6. return $formatted_price;
  7. }
  8. add_filter('em_get_currency_formatted','em_mod_remove_decimal',1,4);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement