Automattic\WooCommerce\Internal\Logging
SafeGlobalFunctionProxy::log_wrapper_error()
Log wrapper function errors to "local logging" for debugging.
Метод класса: SafeGlobalFunctionProxy{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$result = SafeGlobalFunctionProxy::log_wrapper_error( $function_name, $error_message, $context );
- $function_name(строка) (обязательный)
- The name of the wrapped function.
- $error_message(строка) (обязательный)
- The error message.
- $context(массив)
- Additional context for the error.
По умолчанию: array()
Код SafeGlobalFunctionProxy::log_wrapper_error() SafeGlobalFunctionProxy::log wrapper error WC 9.7.1
protected static function log_wrapper_error( $function_name, $error_message, $context = array() ) { self::maybe_load_missing_function( 'wc_get_logger' ); wc_get_logger()->error( '[Wrapper function error] ' . sprintf( 'Error in %s: %s', $function_name, $error_message ), array_merge( array( 'function' => $function_name, 'source' => 'remote-logging', ), $context ) ); }