WC_REST_Order_Refunds_Controller::get_preview_line_items_arg_schema │ private │ WC 1.0

Get the argument schema for the preview route's line_items parameter.

Shared with the wc/v4 preview endpoint (including the line_item_id key naming) so clients can send the same payload to both API versions and the accepted shape cannot drift between them.

Note the two deliberate differences from this controller's create endpoint: the preview keys lines by line_item_id where the create uses id, and the preview's refund_total is tax-inclusive where the create's classic refund_total is net with taxes supplied separately via refund_tax (the compute_totals create shares the preview's tax-inclusive semantics).

Method of the class: WC_REST_Order_Refunds_Controller{}

No Hooks.

Returns

array.

Usage

// private - for code of main (parent) class only
$result = $this->get_preview_line_items_arg_schema();

WC_REST_Order_Refunds_Controller::get_preview_line_items_arg_schema() code WC 11.1.2

private function get_preview_line_items_arg_schema() {
	return $this->get_data_utils()->get_preview_line_items_arg_schema();
}