(hook_prefix)item_schema filter-hookWC 10.2.0

Filter the item schema for this route.

Usage

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(array)
The item schema.

Changelog

Since 10.2.0 Introduced.

Where the hook is called

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

Where the hook is used in WooCommerce

Usage not found.