Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( is_numeric( $price ) ) {
- $decimals = ( $cp_options->hide_decimals || $price == 0 ) ? 0 : 5;
- $decimal_separator = $cp_options->decimal_separator;
- $thousands_separator = $cp_options->thousands_separator;
- $price = number_format( $price, $decimals, $decimal_separator, $thousands_separator );
- }
- return $price;
- if ( is_numeric( $price ) ) {
- $decimals = ( $cp_options->hide_decimals || $price == 0 ) ? 0 : 5;
- $decimal_separator = $cp_options->decimal_separator;
- $thousands_separator = $cp_options->thousands_separator;
- $price = number_format( $price, $decimals, $decimal_separator, $thousands_separator );
- }
- if ($decimals ==0){ return floatval($price);}
- else {return $price;}
Add Comment
Please, Sign In to add comment