WC_Settings_API::add_error
Add an error message for display in admin on save.
Method of the class: WC_Settings_API{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Settings_API = new WC_Settings_API(); $WC_Settings_API->add_error( $error );
- $error(string) (required)
- Error message.
WC_Settings_API::add_error() WC Settings API::add error code WC 10.5.0
public function add_error( $error ) {
$this->errors[] = $error;
}