wc_remove_number_precision( float $value )

Remove precision from a number and return a float.


Description Description


Parameters Parameters

$value

(Required) Number to add precision to.


Top ↑

Return Return

(float)


Top ↑

Source Source

File: includes/wc-core-functions.php

1896
1897
1898
1899
function wc_remove_number_precision( $value ) {
    $cent_precision = pow( 10, wc_get_price_decimals() );
    return $value / $cent_precision;
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.2.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.