Свойство | Type | Description | |
---|---|---|---|
$namespace | string | Endpoint namespace. | |
$report | WC_Admin_Report | Report instance. | |
$rest_base | string | Route base. |
Méthode | Description | |
---|---|---|
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. |
Méthode | Description | |
---|---|---|
setup_report ( array $filter ) | Setup the report object and parse any date filtering. |
public get_collection_params ( ) : array | ||
Résultat | array |
public get_item_schema ( ) : array | ||
Résultat | array |
public get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean | ||
$request | WP_REST_Request | Full details about the request. |
Résultat | WP_Error | boolean |
public prepare_item_for_response ( null $_, WP_REST_Request $request ) : WP_REST_Response | ||
$_ | null | |
$request | WP_REST_Request | Request object. |
Résultat | WP_REST_Response | $response Response data. |
protected setup_report ( array $filter ) | ||
$filter | array | date filtering |
protected WC_Admin_Report $report | ||
Résultat | WC_Admin_Report |