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