WordPress at Your Fingertips
function is not described

WC_Logger::error() public WC 1.0

Adds an error level message.

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

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

No Hooks.


null. Nothing.


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


Code of WC_Logger::error() WC 5.9.0

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