Automattic\WooCommerce\Admin

DeprecatedClassFacade::log_deprecation()private staticWC 1.0

Log a deprecation to the error log.

Метод класса: DeprecatedClassFacade{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = DeprecatedClassFacade::log_deprecation( $function );
$function(строка) (обязательный)
The name of the deprecated function being called.

Код DeprecatedClassFacade::log_deprecation() WC 8.9.0

private static function log_deprecation( $function ) {
	$message = sprintf(
		'%1$s is deprecated since version %2$s! Use %3$s instead.',
		static::class . '::' . $function,
		static::$deprecated_in_version,
		static::$facade_over_classname . '::' . $function
	);

	// Only log when the message has not been logged before.
	if ( ! in_array( $message, self::$logged_messages, true ) ) {
		error_log( $message ); // phpcs:ignore
		self::$logged_messages[] = $message;
	}
}