OrderNoteSchema
extends AbstractSchema
in package
OrderNoteSchema class.
Table of Contents
- IDENTIFIER = 'order_note'
- The schema item identifier.
- VIEW_EDIT_CONTEXT = array('view', 'edit')
- Context for the item schema - view and edit only.
- VIEW_EDIT_EMBED_CONTEXT = array('view', 'edit', 'embed')
- Context for the item schema - view, edit, and embed.
- get_item_response() : array<string|int, mixed>
- Get the item response.
- get_item_schema() : array<string|int, mixed>
- Get the item schema.
- get_item_schema_properties() : array<string|int, mixed>
- Return all properties for the item schema.
- get_writable_item_schema_properties() : array<string|int, mixed>
- Return all writable properties for the item schema.
- filter_writable_props() : bool
- Filter schema properties to only return writable ones.
Constants
IDENTIFIER
The schema item identifier.
public
string
IDENTIFIER
= 'order_note'
VIEW_EDIT_CONTEXT
Context for the item schema - view and edit only.
public
array<string|int, mixed>
VIEW_EDIT_CONTEXT
= array('view', 'edit')
Tags
VIEW_EDIT_EMBED_CONTEXT
Context for the item schema - view, edit, and embed.
public
array<string|int, mixed>
VIEW_EDIT_EMBED_CONTEXT
= array('view', 'edit', 'embed')
Tags
Methods
get_item_response()
Get the item response.
public
get_item_response(WP_Comment $note, WP_REST_Request $request[, array<string|int, mixed> $include_fields = array() ]) : array<string|int, mixed>
Parameters
- $note : WP_Comment
-
Order note object.
- $request : WP_REST_Request
-
Request object.
- $include_fields : array<string|int, mixed> = array()
-
Fields to include in the response.
Return values
array<string|int, mixed> — The item response.get_item_schema()
Get the item schema.
public
get_item_schema() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> — The item schema.get_item_schema_properties()
Return all properties for the item schema.
public
get_item_schema_properties() : array<string|int, mixed>
Note that context determines under which context data should be visible. For example, edit would be the context used when getting records with the intent of editing them. embed context allows the data to be visible when the item is being embedded in another response.
Return values
array<string|int, mixed> —get_writable_item_schema_properties()
Return all writable properties for the item schema.
public
get_writable_item_schema_properties() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> — The schema properties.filter_writable_props()
Filter schema properties to only return writable ones.
protected
filter_writable_props(array<string|int, mixed> $schema) : bool
Parameters
- $schema : array<string|int, mixed>
-
The schema property to check.
