Function wc_format_decimal

Format decimal numbers ready for DB storage

Sanitize, remove locale formatting, and optionally round + trim off zeros

Package: WooCommerce\Functions
Author: WooThemes
Located at includes/wc-formatting-functions.php

Parameters summary

float|string $number Expects either a float or a string with a decimal separator only (no thousands)
mixed $dp = false number of decimal points to use, blank to use woocommerce_price_num_decimals, or false to avoid all rounding.
boolean $trim_zeros = false from end of string

Return value summary

string
WooCommerce API documentation generated by ApiGen 2.8.0