Automattic\WooCommerce\StoreApi\Utilities

ProductQuery::prepare_price_filter()protectedWC 1.0

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() code WC 9.0.1

protected function prepare_price_filter( $price_filter ) {
	return floatval( $price_filter / ( 10 ** wc_get_price_decimals() ) );
}