Automattic\WooCommerce\Internal\ProductFilters
FilterData::get_transient_key
Get filter data transient key.
Метод класса: FilterData{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_transient_key( $query_vars, $filter_type, $extra );
- $query_vars(массив) (обязательный)
- The query arguments to calculate the filter data.
- $filter_type(строка) (обязательный)
- The type of filter. Accepts price|stock|rating|attribute.
- $extra(массив)
- Some filter types require extra arguments for calculation, like attribute.
По умолчанию:array()
Код FilterData::get_transient_key() FilterData::get transient key WC 11.2.2
private function get_transient_key( $query_vars, $filter_type, $extra = array() ) {
return sprintf(
'wc_%s_%s',
CacheController::CACHE_GROUP,
md5(
wp_json_encode(
array(
'query_vars' => $this->normalize_query_vars( $query_vars ),
'extra' => $extra,
'filter_type' => $filter_type,
)
)
)
);
}