Automattic\WooCommerce\Internal\RestApi\Routes\V4\Refunds\Schema
RefundPreviewSchema::get_product_item_schema
Schema for an item entry in the products section (extends the base with product_id).
Метод класса: RefundPreviewSchema{}
Хуков нет.
Возвращает
Массив.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_product_item_schema(): array;
Код RefundPreviewSchema::get_product_item_schema() RefundPreviewSchema::get product item schema WC 11.0.1
private function get_product_item_schema(): array {
$schema = $this->get_base_item_schema();
$schema['properties']['product_id'] = array(
'description' => __( 'Product or variation ID.', 'woocommerce' ),
'type' => 'integer',
'context' => self::VIEW_EDIT_EMBED_CONTEXT,
'readonly' => true,
);
return $schema;
}