(FILTER_NAME_SPECS) хук-фильтрWC 8.8.0

Filter specs.

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

add_filter( '(FILTER_NAME_SPECS)', 'wp_kama_FILTER_NAME_SPECS_filter', 10, 2 );

/**
 * Function for `(FILTER_NAME_SPECS)` filter-hook.
 * 
 * @param array  $specs List of specs.
 * @param string $id    Spec identifier.
 *
 * @return array
 */
function wp_kama_FILTER_NAME_SPECS_filter( $specs, $id ){

	// filter...
	return $specs;
}
$specs(массив)
List of specs.
$id(строка)
Spec identifier.

Список изменений

С версии 8.8.0 Введена.

Где вызывается хук

DataSourcePoller::get_specs_from_data_sources()
DataSourcePoller::get_cached_specs()
(FILTER_NAME_SPECS)
woocommerce/src/Admin/RemoteSpecs/DataSourcePoller.php 125
$specs = apply_filters( self::FILTER_NAME_SPECS, $specs, $this->id );
woocommerce/src/Admin/RemoteSpecs/DataSourcePoller.php 147
$specs = apply_filters( self::FILTER_NAME_SPECS, $specs, $this->id );

Где используется хук в WooCommerce

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