(hook_prefix)item_schema хук-фильтрWC 10.2.0

Filter the item schema for this route.

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

add_filter( '(hook_prefix)item_schema', 'wp_kama_hook_prefixitem_schema_filter' );

/**
 * Function for `(hook_prefix)item_schema` filter-hook.
 * 
 * @param array $schema The item schema.
 *
 * @return array
 */
function wp_kama_hook_prefixitem_schema_filter( $schema ){

	// filter...
	return $schema;
}
$schema(массив)
The item schema.

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

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

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

AbstractController::get_item_schema()
(hook_prefix)item_schema
woocommerce/src/Internal/RestApi/Routes/V4/AbstractController.php 125
$this->schema = apply_filters( $this->get_hook_prefix() . 'item_schema', $this->add_additional_fields_schema( $this->get_schema() ) );

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

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