Automattic\WooCommerce\Blocks\BlockTypes

ProductFilterPrice::get_filter_query_param_keys()publicWC 1.0

Register the query param keys.

Method of the class: ProductFilterPrice{}

No Hooks.

Return

Array. Active filters param keys.

Usage

$ProductFilterPrice = new ProductFilterPrice();
$ProductFilterPrice->get_filter_query_param_keys( $filter_param_keys, $url_param_keys );
$filter_param_keys(array) (required)
The active filters data.
$url_param_keys(array) (required)
The query param parsed from the URL.

ProductFilterPrice::get_filter_query_param_keys() code WC 8.9.0

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
	);
}