Class WC_API_Server
Methods summary
public
|
|
public
WP_User|WP_Error
|
|
protected
array
|
|
public
|
|
public
array
|
|
public
mixed
|
|
protected
array
|
#
sort_callback_params( callable|array $callback, array $provided )
Sort parameters by order specified in method declaration |
public
array
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
string
|
|
public
string
|
|
public
string
|
#
format_datetime( integer|string $timestamp, boolean $convert_to_utc = false )
Format a unix timestamp or MySQL datetime into an RFC3339 datetime |
public
array
|
Magic methods summary
Constants summary
integer |
METHOD_GET
|
1 |
|
integer |
METHOD_POST
|
2 |
|
integer |
METHOD_PUT
|
4 |
|
integer |
METHOD_PATCH
|
8 |
|
integer |
METHOD_DELETE
|
16 |
|
integer |
READABLE
|
1 |
|
integer |
CREATABLE
|
2 |
|
integer |
EDITABLE
|
14 |
|
integer |
DELETABLE
|
16 |
|
integer |
ALLMETHODS
|
31 |
|
integer |
ACCEPT_RAW_DATA
|
64 |
#
Does the endpoint accept a raw request body? |
integer |
ACCEPT_DATA
|
128 |
#
Does the endpoint accept a request body? (either JSON or XML) |
integer |
HIDDEN_ENDPOINT
|
256 |
#
Should we hide this endpoint from the index? |
Properties summary
public static
array
|
$method_map |
#
Map of HTTP verbs to constants |
public
string
|
$path |
#
Requested path (relative to the API root, wp-json.php) |
public
string
|
$method |
#
Requested method (GET/HEAD/POST/PUT/PATCH/DELETE) |
public
array
|
$params |
#
Request parameters |
public
array
|
$headers |
#
Request headers |
public
array
|
$files |
#
Request files (matches $_FILES) |
public
|
$handler |
#
Request/Response handler, either JSON by default or XML if requested by client |