WC_REST_Authentication::set_error
Set authentication error.
Method of the class: WC_REST_Authentication{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->set_error( $error );
- $error(WP_Error) (required)
- Authentication error data.
WC_REST_Authentication::set_error() WC REST Authentication::set error code WC 10.8.1
protected function set_error( $error ) {
// Reset user.
$this->user = null;
$this->error = $error;
}