Automattic\WooCommerce\Internal\Abilities\Domain
AbstractDomainAbility::get_entity_output_schema
Get an entity output schema.
Метод класса: AbstractDomainAbility{}
Хуков нет.
Возвращает
Массив.
Использование
$result = AbstractDomainAbility::get_entity_output_schema( $entity_key, $item_schema ): array;
- $entity_key(строка) (обязательный)
- Entity property key.
- $item_schema(массив) (обязательный)
- JSON schema describing the entity.
Код AbstractDomainAbility::get_entity_output_schema() AbstractDomainAbility::get entity output schema WC 10.9.1
protected static function get_entity_output_schema( string $entity_key, array $item_schema ): array {
return array(
'type' => 'object',
'properties' => array(
$entity_key => $item_schema,
),
'additionalProperties' => false,
);
}