Api_Provide_Error_Response

Provides a `send_error_response` method that can be used to communicate error messages via the react app.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Table of Contents

send_error_response()  : WP_REST_Response
Send an error response via `WP_Rest_Response`.

Methods

send_error_response()

Send an error response via `WP_Rest_Response`.

public send_error_response(string $message) : WP_REST_Response
Parameters
$message : string

the message to display as an error.

Return values
WP_REST_Response

Search results