WC_REST_Refunds_Controller::get_item_schema()publicWC 9.0.0

Get the refund schema, conforming to JSON Schema.

Метод класса: WC_REST_Refunds_Controller{}

Хуков нет.

Возвращает

Массив.

Использование

$WC_REST_Refunds_Controller = new WC_REST_Refunds_Controller();
$WC_REST_Refunds_Controller->get_item_schema();

Список изменений

С версии 9.0.0 Введена.

Код WC_REST_Refunds_Controller::get_item_schema() WC 9.8.1

public function get_item_schema() {
	$schema = parent::get_item_schema();

	$schema['properties'] = array_merge(
		array_slice( $schema['properties'], 0, 1, true ),
		array(
			'parent_id' => array(
				'description' => __( 'Parent order ID.', 'woocommerce' ),
				'type'        => 'integer',
				'context'     => array( 'view', 'edit' ),
			),
		),
		array_slice( $schema['properties'], 1, null, true )
	);

	return $schema;
}