WC_REST_Refunds_Controller::get_item_schema
Get the refund schema, conforming to JSON Schema.
Method of the class: WC_REST_Refunds_Controller{}
No Hooks.
Returns
Array.
Usage
$WC_REST_Refunds_Controller = new WC_REST_Refunds_Controller(); $WC_REST_Refunds_Controller->get_item_schema();
Changelog
| Since 9.0.0 | Introduced. |
WC_REST_Refunds_Controller::get_item_schema() WC REST Refunds Controller::get item schema code WC 10.5.0
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;
}