WC_Log_Handler_Email::get_subject()protectedWC 1.0

Build subject for log email.

Method of the class: WC_Log_Handler_Email{}

No Hooks.

Return

String. subject

Usage

// protected - for code of main (parent) or child class
$result = $this->get_subject();

WC_Log_Handler_Email::get_subject() code WC 8.7.0

protected function get_subject() {
	$site_name = get_bloginfo( 'name' );
	$max_level = strtoupper( WC_Log_Levels::get_severity_level( $this->max_severity ) );
	$log_count = count( $this->logs );

	return sprintf(
		/* translators: 1: Site name 2: Maximum level 3: Log count */
		_n(
			'[%1$s] %2$s: %3$s WooCommerce log message',
			'[%1$s] %2$s: %3$s WooCommerce log messages',
			$log_count,
			'woocommerce'
		),
		$site_name,
		$max_level,
		$log_count
	);
}