Property | Type | Description | |
---|---|---|---|
$namespace | string | Endpoint namespace. | |
$rest_base | string | Route base. |
Method | Description | |
---|---|---|
get_item_schema ( ) : array | Get the Report's schema, conforming to JSON Schema. | |
get_items ( WP_REST_Request $request ) : array | WP_Error | Get sales reports. | |
prepare_item_for_response ( stdClass $top_seller, WP_REST_Request $request ) : WP_REST_Response | Prepare a report sales object for serialization. |
public get_item_schema ( ) : array | ||
return | array |
public prepare_item_for_response ( stdClass $top_seller, WP_REST_Request $request ) : WP_REST_Response | ||
$top_seller | stdClass | |
$request | WP_REST_Request | Request object. |
return | WP_REST_Response | $response Response data. |