Свойство | Тип | Описание | |
---|---|---|---|
$namespace | string | Endpoint namespace. | |
$report | WC_Admin_Report | Report instance. | |
$rest_base | string | Route base. |
Метод | Описание | |
---|---|---|
get_collection_params ( ) : array | Get the query params for collections. | |
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. | |
get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | Check whether a given request has permission to read report. | |
prepare_item_for_response ( null $_, WP_REST_Request $request ) : WP_REST_Response | Prepare a report sales object for serialization. | |
register_routes ( ) | Register the routes for sales reports. |
Метод | Описание | |
---|---|---|
setup_report ( array $filter ) | Setup the report object and parse any date filtering. |
public get_collection_params ( ) : array | ||
Результат | array |
public get_item_schema ( ) : array | ||
Результат | array |
public get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | ||
$request | WP_REST_Request | Full details about the request. |
Результат | WP_Error | boolean |
public prepare_item_for_response ( null $_, WP_REST_Request $request ) : WP_REST_Response | ||
$_ | null | |
$request | WP_REST_Request | Request object. |
Результат | WP_REST_Response | $response Response data. |
protected setup_report ( array $filter ) | ||
$filter | array | date filtering |
protected WC_Admin_Report $report | ||
Результат | WC_Admin_Report |