Merge pull request #15628 from woocommerce/update/15623

woocommerce_format_localized_decimal + woocommerce_format_localized_price filters
This commit is contained in:
Mike Jolley 2017-06-19 10:13:02 +01:00 committed by GitHub
commit 1f7b0265c1
1 changed files with 2 additions and 2 deletions

View File

@ -304,7 +304,7 @@ function wc_float_to_string( $float ) {
* @return string
*/
function wc_format_localized_price( $value ) {
return str_replace( '.', wc_get_price_decimal_separator(), strval( $value ) );
return apply_filters( 'woocommerce_format_localized_price', str_replace( '.', wc_get_price_decimal_separator(), strval( $value ) ), $value );
}
/**
@ -314,7 +314,7 @@ function wc_format_localized_price( $value ) {
*/
function wc_format_localized_decimal( $value ) {
$locale = localeconv();
return str_replace( '.', $locale['decimal_point'], strval( $value ) );
return apply_filters( 'woocommerce_format_localized_decimal', str_replace( '.', $locale['decimal_point'], strval( $value ) ), $value );
}
/**