Automattic\WooCommerce\Blocks\Domain\Services
ExtendRestApi::format_extensions_properties() private WC 1.0
Format schema for an extension.
{} Это метод класса: ExtendRestApi{}
Хуков нет.
Возвращает
Массив. Formatted schema.
Использование
// private - только в коде основоного (родительского) класса $result = $this->format_extensions_properties( $namespace, $schema );
- $namespace(строка) (обязательный)
- Error message or Exception.
- $schema(массив) (обязательный)
- An error to throw if we have debug enabled and user is admin.
Код ExtendRestApi::format_extensions_properties() ExtendRestApi::format extensions properties WC 5.0.0
private function format_extensions_properties( $namespace, $schema ) {
return [
/* translators: %s: extension namespace */
'description' => sprintf( __( 'Extension data registered by %s', 'woocommerce' ), $namespace ),
'type' => [ 'object', 'null' ],
'context' => [ 'view', 'edit' ],
'readonly' => true,
'properties' => $schema,
];
}