Automattic\WooCommerce\Admin\RemoteInboxNotifications

EvaluationLogger::add_result()publicWC 1.0

Add evaluation result of a rule.

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

No Hooks.

Return

null. Nothing.

Usage

$EvaluationLogger = new EvaluationLogger();
$EvaluationLogger->add_result( $rule_type, $result );
$rule_type(string) (required)
name of the rule being tested.
$result(true|false) (required)
result of a given rule.

Code of EvaluationLogger::add_result() WC 7.1.0

public function add_result( $rule_type, $result ) {
	array_push(
		$this->results,
		array(
			'rule'   => $rule_type,
			'result' => $result ? 'passed' : 'failed',
		)
	);
}