Automattic\WooCommerce\Internal\RestApi\Routes\V4
AbstractController::get_item_schema
Get item schema, conforming to JSON Schema. Extended by routes.
Method of the class: AbstractController{}
Hooks from the method
Returns
Array. The item schema.
Usage
$AbstractController = new AbstractController(); $AbstractController->get_item_schema();
Changelog
| Since 10.2.0 | Introduced. |
AbstractController::get_item_schema() AbstractController::get item schema code WC 10.4.3
public function get_item_schema() {
// Cache the schema for the route.
if ( null === $this->schema ) {
/**
* Filter the item schema for this route.
*
* @param array $schema The item schema.
* @since 10.2.0
*/
$this->schema = apply_filters( $this->get_hook_prefix() . 'item_schema', $this->add_additional_fields_schema( $this->get_schema() ) );
}
return $this->schema;
}