WC_REST_Data_Currencies_Controller::get_item_schema
Get the currency schema, conforming to JSON Schema.
Method of the class: WC_REST_Data_Currencies_Controller{}
No Hooks.
Returns
Array.
Usage
$WC_REST_Data_Currencies_Controller = new WC_REST_Data_Currencies_Controller(); $WC_REST_Data_Currencies_Controller->get_item_schema();
WC_REST_Data_Currencies_Controller::get_item_schema() WC REST Data Currencies Controller::get item schema code WC 10.5.0
public function get_item_schema() {
$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'title' => 'data_currencies',
'type' => 'object',
'properties' => array(
'code' => array(
'type' => 'string',
'description' => __( 'ISO4217 currency code.', 'woocommerce' ),
'context' => array( 'view' ),
'readonly' => true,
),
'name' => array(
'type' => 'string',
'description' => __( 'Full name of currency.', 'woocommerce' ),
'context' => array( 'view' ),
'readonly' => true,
),
'symbol' => array(
'type' => 'string',
'description' => __( 'Currency symbol.', 'woocommerce' ),
'context' => array( 'view' ),
'readonly' => true,
),
),
);
return $this->add_additional_fields_schema( $schema );
}