Automattic\WooCommerce\StoreApi\Utilities

ProductQuery::prepare_price_filter()protectedWC 1.0

Converts price filter from subunits to decimal.

Метод класса: ProductQuery{}

Хуков нет.

Возвращает

float. Price filter in decimal format.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->prepare_price_filter( $price_filter );
$price_filter(строка|int) (обязательный)
Raw price filter in subunit format.

Код ProductQuery::prepare_price_filter() WC 8.7.0

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