Automattic\WooCommerce\Admin\RemoteInboxNotifications

NoteStatusRuleProcessor::process()publicWC 1.0

Compare against the status of another note.

Method of the class: NoteStatusRuleProcessor{}

No Hooks.

Return

true|false. The result of the operation.

Usage

$NoteStatusRuleProcessor = new NoteStatusRuleProcessor();
$NoteStatusRuleProcessor->process( $rule, $stored_state );
$rule(object) (required)
The rule being processed by this rule processor.
$stored_state(object) (required)
Stored state.

NoteStatusRuleProcessor::process() code WC 8.7.0

public function process( $rule, $stored_state ) {
	$status = Notes::get_note_status( $rule->note_name );
	if ( ! $status ) {
		return false;
	}

	return ComparisonOperation::compare(
		$status,
		$rule->status,
		$rule->operation
	);
}