Merge pull request #15628 from woocommerce/update/15623
woocommerce_format_localized_decimal + woocommerce_format_localized_price filters
This commit is contained in:
commit
1f7b0265c1
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue