Sep 5th, 2017
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. Takes code from em_get_currency_formatted and filters said function so that it removes the decimal places from the formatted price.
  4. For information on implementing this snippet see this -
  5.  */
  6. function my_em_custom_currency( $formatted_price, $price, $currency, $format ){
  7.     $formatted_price = str_replace('@', em_get_currency_symbol(true,$currency), $format);
  8.     $formatted_price = str_replace('#', number_format( $price, 0, get_option('dbem_bookings_currency_decimal_point','.'), get_option('dbem_bookings_currency_thousands_sep',',') ), $formatted_price);
  9.     return $formatted_price;
  10. }
  11. add_filter('em_get_currency_formatted', 'my_em_custom_currency', 10, 4);
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.