프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 |