PHP Class WC_REST_Order_Notes_Controller

Inheritance: extends WC_REST_Controller
Afficher le fichier Open project: woocommerce/woocommerce

Protected Properties

Свойство Type Description
$namespace string Endpoint namespace.
$post_type string Post type.
$rest_base string Route base.

Méthodes publiques

Méthode Description
create_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response Create a single order note.
create_item_permissions_check ( WP_REST_Request $request ) : boolean Check if a given request has access create order notes.
delete_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Delete a single order note.
delete_item_permissions_check ( WP_REST_Request $request ) : boolean Check if a given request has access delete a order note.
get_collection_params ( ) : array Get the query params for collections.
get_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response Get a single order note.
get_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean Check if a given request has access to read a order note.
get_item_schema ( ) : array Get the Order Notes schema, conforming to JSON Schema.
get_items ( WP_REST_Request $request ) : array Get order notes from an order.
get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean Check whether a given request has permission to read order notes.
prepare_item_for_response ( WP_Comment $note, WP_REST_Request $request ) : WP_REST_Response Prepare a single order note output for response.
register_routes ( ) Register the routes for order notes.

Méthodes protégées

Méthode Description
prepare_links ( WP_Comment $note ) : array Prepare links for the request.

Method Details

create_item() public méthode

Create a single order note.
public create_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response
$request WP_REST_Request Full details about the request.
Résultat WP_Error | WP_REST_Response

create_item_permissions_check() public méthode

Check if a given request has access create order notes.
public create_item_permissions_check ( WP_REST_Request $request ) : boolean
$request WP_REST_Request Full details about the request.
Résultat boolean

delete_item() public méthode

Delete a single order note.
public delete_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
Résultat WP_REST_Response | WP_Error

delete_item_permissions_check() public méthode

Check if a given request has access delete a order note.
public delete_item_permissions_check ( WP_REST_Request $request ) : boolean
$request WP_REST_Request Full details about the request.
Résultat boolean

get_collection_params() public méthode

Get the query params for collections.
public get_collection_params ( ) : array
Résultat array

get_item() public méthode

Get a single order note.
public get_item ( WP_REST_Request $request ) : WP_Error | WP_REST_Response
$request WP_REST_Request Full details about the request.
Résultat WP_Error | WP_REST_Response

get_item_permissions_check() public méthode

Check if a given request has access to read a order note.
public get_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean
$request WP_REST_Request Full details about the request.
Résultat WP_Error | boolean

get_item_schema() public méthode

Get the Order Notes schema, conforming to JSON Schema.
public get_item_schema ( ) : array
Résultat array

get_items() public méthode

Get order notes from an order.
public get_items ( WP_REST_Request $request ) : array
$request WP_REST_Request
Résultat array

get_items_permissions_check() public méthode

Check whether a given request has permission to read order notes.
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

prepare_item_for_response() public méthode

Prepare a single order note output for response.
public prepare_item_for_response ( WP_Comment $note, WP_REST_Request $request ) : WP_REST_Response
$note WP_Comment Order note object.
$request WP_REST_Request Request object.
Résultat WP_REST_Response $response Response data.

register_routes() public méthode

Register the routes for order notes.
public register_routes ( )

Property Details

$namespace protected_oe property

Endpoint namespace.
protected string $namespace
Résultat string

$post_type protected_oe property

Post type.
protected string $post_type
Résultat string

$rest_base protected_oe property

Route base.
protected string $rest_base
Résultat string