Automattic\WooCommerce\Admin\RemoteInboxNotifications

StoredStateRuleProcessor::process()publicWC 1.0

Performs a comparison operation against a value in the stored state object.

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

Хуков нет.

Возвращает

true|false. The result of the operation.

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

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

Код StoredStateRuleProcessor::process() WC 6.4.1

public function process( $rule, $stored_state ) {
	if ( ! isset( $stored_state->{$rule->index} ) ) {
		return false;
	}

	return ComparisonOperation::compare(
		$stored_state->{$rule->index},
		$rule->value,
		$rule->operation
	);
}