WC_REST_Network_Orders_V2_Controller::get_public_item_schema
Retrieves the item's schema for display / public consumption purposes.
Method of the class: WC_REST_Network_Orders_V2_Controller{}
No Hooks.
Returns
Array. Public item schema data.
Usage
$WC_REST_Network_Orders_V2_Controller = new WC_REST_Network_Orders_V2_Controller(); $WC_REST_Network_Orders_V2_Controller->get_public_item_schema();
WC_REST_Network_Orders_V2_Controller::get_public_item_schema() WC REST Network Orders V2 Controller::get public item schema code WC 10.3.6
public function get_public_item_schema() {
$schema = parent::get_public_item_schema();
$schema['properties']['blog'] = array(
'description' => __( 'Blog id of the record on the multisite.', 'woocommerce' ),
'type' => 'integer',
'context' => array( 'view' ),
'readonly' => true,
);
$schema['properties']['edit_url'] = array(
'description' => __( 'URL to edit the order', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view' ),
'readonly' => true,
);
$schema['properties']['customer'][] = array(
'description' => __( 'Name of the customer for the order', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view' ),
'readonly' => true,
);
$schema['properties']['status_name'][] = array(
'description' => __( 'Order Status', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view' ),
'readonly' => true,
);
$schema['properties']['formatted_total'][] = array(
'description' => __( 'Order total formatted for locale', 'woocommerce' ),
'type' => 'string',
'context' => array( 'view' ),
'readonly' => true,
);
return $schema;
}