WC_REST_Orders_Controller::get_item_schema()
Get the Order's schema, conforming to JSON Schema.
Method of the class: WC_REST_Orders_Controller{}
No Hooks.
Return
Array
.
Usage
$WC_REST_Orders_Controller = new WC_REST_Orders_Controller(); $WC_REST_Orders_Controller->get_item_schema();
WC_REST_Orders_Controller::get_item_schema() WC REST Orders Controller::get item schema code WC 9.5.1
public function get_item_schema() { $schema = parent::get_item_schema(); $schema['properties']['coupon_lines']['items']['properties']['discount']['readonly'] = true; $schema['properties']['manual_update'] = array( 'default' => false, 'description' => __( 'Set the action as manual so that the order note registers as "added by user".', 'woocommerce' ), 'type' => 'boolean', 'context' => array( 'edit' ), ); if ( $this->cogs_is_enabled() ) { $schema = $this->add_cogs_related_schema( $schema ); } return $schema; }