daily pastebin goal
86%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if ( is_numeric( $price ) ) {
  2.     $decimals = ( $cp_options->hide_decimals || $price == 0 ) ? 0 : 5;
  3.     $decimal_separator = $cp_options->decimal_separator;
  4.     $thousands_separator = $cp_options->thousands_separator;
  5.  
  6.     $price = number_format( $price, $decimals, $decimal_separator, $thousands_separator );
  7. }
  8.  
  9. return $price;
  10.    
  11. if ( is_numeric( $price ) ) {
  12.     $decimals = ( $cp_options->hide_decimals || $price == 0 ) ? 0 : 5;
  13.     $decimal_separator = $cp_options->decimal_separator;
  14.     $thousands_separator = $cp_options->thousands_separator;
  15.  
  16.     $price = number_format( $price, $decimals, $decimal_separator, $thousands_separator );
  17. }
  18.  
  19. if ($decimals ==0){ return floatval($price);}
  20. else {return $price;}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top