Automattic\WooCommerce\Admin\RemoteInboxNotifications

OrRuleProcessor::process()publicWC 1.0

Performs an OR operation on the rule's left and right operands.

{} Это метод класса: OrRuleProcessor{}

Хуков нет.

Возвращает

true|false. The result of the operation.

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

$OrRuleProcessor = new OrRuleProcessor();
$OrRuleProcessor->process( $rule, $stored_state );
$rule(объект) (обязательный)
The specific rule being processed by this rule processor.
$stored_state(объект) (обязательный)
Stored state.

Код OrRuleProcessor::process() WC 6.4.1

public function process( $rule, $stored_state ) {
	foreach ( $rule->operands as $operand ) {
		$evaluated_operand = $this->rule_evaluator->evaluate(
			$operand,
			$stored_state
		);

		if ( $evaluated_operand ) {
			return true;
		}
	}

	return false;
}