Automattic\WooCommerce\StoreApi\Utilities
ProductQuery::prepare_price_filter()
Converts price filter from subunits to decimal.
Method of the class: ProductQuery{}
No Hooks.
Return
float
. Price filter in decimal format.
Usage
// protected - for code of main (parent) or child class $result = $this->prepare_price_filter( $price_filter );
- $price_filter(string|int) (required)
- Raw price filter in subunit format.
ProductQuery::prepare_price_filter() ProductQuery::prepare price filter code WC 7.7.0
protected function prepare_price_filter( $price_filter ) { return floatval( $price_filter / ( 10 ** wc_get_price_decimals() ) ); }