/** * Used throughout the extension instead of 'wc_price'. * * @param double $price * @return string */ public function get_composited_item_price_string_price($price, $args = array()) { $return = ''; $num_decimals = wc_cp_price_num_decimals(); $currency = isset($args['currency']) ? $args['currency'] : ''; $currency_symbol = get_woocommerce_currency_symbol($currency); $decimal_sep = wc_cp_price_decimal_sep(); $thousands_sep = wc_cp_price_thousand_sep(); $price = apply_filters('raw_woocommerce_price', floatval($price)); $price = apply_filters('formatted_woocommerce_price', number_format($price, $num_decimals, $decimal_sep, $thousands_sep), $price, $num_decimals, $decimal_sep, $thousands_sep); if (apply_filters('woocommerce_price_trim_zeros', false) && $num_decimals > 0) { $price = wc_trim_zeros($price); } $return = sprintf(get_woocommerce_price_format(), $currency_symbol, $price); return $return; }
function wc_composite_price_decimal_sep() { _deprecated_function('wc_composite_price_decimal_sep()', '3.5.0', 'wc_cp_price_decimal_sep()'); return wc_cp_price_decimal_sep(); }