Automattic\WooCommerce\Blocks\StoreApi\Utilities
ProductQuery::prepare_price_filter() protected WC 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(строка/число) (обязательный)
- Raw price filter in subunit format.
Код ProductQuery::prepare_price_filter() ProductQuery::prepare price filter WC 5.1.0
protected function prepare_price_filter( $price_filter ) {
return floatval( $price_filter / ( 10 ** wc_get_price_decimals() ) );
}