Automattic\WooCommerce\Internal\Fulfillments
OrderFulfillmentsRestController::get_schema_for_meta_data
Get the schema for the meta data.
Method of the class: OrderFulfillmentsRestController{}
No Hooks.
Returns
Array.
Usage
// private - for code of main (parent) class only $result = $this->get_schema_for_meta_data(): array;
OrderFulfillmentsRestController::get_schema_for_meta_data() OrderFulfillmentsRestController::get schema for meta data code WC 10.3.3
private function get_schema_for_meta_data(): array {
return array(
'type' => 'object',
'properties' => array(
'id' => array(
'description' => __( 'The unique identifier for the meta data. Set `0` for new records.', 'woocommerce' ),
'type' => 'integer',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'key' => array(
'description' => __( 'The key of the meta data.', 'woocommerce' ),
'type' => 'string',
'required' => true,
'context' => array( 'view', 'edit' ),
),
'value' => array(
'description' => __( 'The value of the meta data.', 'woocommerce' ),
'type' => 'string',
'required' => true,
'context' => array( 'view', 'edit' ),
),
),
'required' => true,
'context' => array( 'view', 'edit' ),
'readonly' => true,
);
}