WordPress at Your Fingertips
function is not described

WC_Settings_API::add_error() public WC 1.0

Add an error message for display in admin on save.

{} It's a method of the class: WC_Settings_API{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Settings_API = new WC_Settings_API();
$WC_Settings_API->add_error( $error );
$error(string) (required)
Error message.

Code of WC_Settings_API::add_error() WC 5.5.2

<?php
public function add_error( $error ) {
	$this->errors[] = $error;
}