Automattic\WooCommerce\Blocks\BlockTypes

ProductFilterPrice::get_filter_query_param_keyspublicWC 1.0

Register the query param keys.

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

Хуков нет.

Возвращает

Массив. Active filters param keys.

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

$ProductFilterPrice = new ProductFilterPrice();
$ProductFilterPrice->get_filter_query_param_keys( $filter_param_keys, $url_param_keys );
$filter_param_keys(массив) (обязательный)
The active filters data.
$url_param_keys(массив) (обязательный)
The query param parsed from the URL.

Код ProductFilterPrice::get_filter_query_param_keys() WC 9.9.4

public function get_filter_query_param_keys( $filter_param_keys, $url_param_keys ) {
	$price_param_keys = array_filter(
		$url_param_keys,
		function ( $param ) {
			return self::MIN_PRICE_QUERY_VAR === $param || self::MAX_PRICE_QUERY_VAR === $param;
		}
	);

	return array_merge(
		$filter_param_keys,
		$price_param_keys
	);
}