WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\RemoteInboxNotifications

EvaluateAndGetStatus::evaluate() public WC 1.0

Evaluates the spec and returns a status.

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

No Hooks.

Return

String. The evaluated status.

Usage

$result = EvaluateAndGetStatus::evaluate( $spec, $current_status, $stored_state, $rule_evaluator );
$spec(array) (required)
The spec to evaluate.
$current_status(string) (required)
The note's current status.
$stored_state(object) (required)
Stored state.
$rule_evaluator(object) (required)
Evaluates rules into true/false.

Code of EvaluateAndGetStatus::evaluate() WC 5.2.2

<?php
public static function evaluate( $spec, $current_status, $stored_state, $rule_evaluator ) {
	// No rules should leave the note alone.
	if ( ! isset( $spec->rules ) ) {
		return $current_status;
	}

	$evaluated_result = $rule_evaluator->evaluate( $spec->rules, $stored_state );

	// Pending notes should be the spec status if the spec passes,
	// left alone otherwise.
	if ( Note::E_WC_ADMIN_NOTE_PENDING === $current_status ) {
		return $evaluated_result
			? $spec->status
			: Note::E_WC_ADMIN_NOTE_PENDING;
	}

	// When allow_redisplay isn't set, just leave the note alone.
	if ( ! isset( $spec->allow_redisplay ) || ! $spec->allow_redisplay ) {
		return $current_status;
	}

	// allow_redisplay is set, unaction the note if eval to true.
	return $evaluated_result
		? Note::E_WC_ADMIN_NOTE_UNACTIONED
		: $current_status;
}