Automattic\WooCommerce\Blocks\BlockTypes
ProductFilterPrice::get_filter_query_param_keys()
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() ProductFilterPrice::get filter query param keys code WC 9.7.1
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 ); }