WC_REST_Authentication::set_error()
Set authentication error.
Method of the class: WC_REST_Authentication{}
No Hooks.
Return
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 8.7.0
protected function set_error( $error ) { // Reset user. $this->user = null; $this->error = $error; }