WC_Logger::error()publicWC 1.0

Adds an error level message.

Runtime errors that do not require immediate action but should typically be logged and monitored.

Method of the class: WC_Logger{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Logger = new WC_Logger();
$WC_Logger->error( $message, $context );
$message(string) (required)
Message to log.
$context(array)
Log context.
Default: array()

Notes

WC_Logger::error() code WC 9.4.2

public function error( $message, $context = array() ) {
	$this->log( WC_Log_Levels::ERROR, $message, $context );
}