Automattic\WooCommerce\Admin\RemoteInboxNotifications

OrderCountRuleProcessor::process()publicWC 1.0

Process the rule.

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

No Hooks.

Return

true|false. Whether the rule passes or not.

Usage

$OrderCountRuleProcessor = new OrderCountRuleProcessor();
$OrderCountRuleProcessor->process( $rule, $stored_state );
$rule(object) (required)
The rule to process.
$stored_state(object) (required)
Stored state.

Код OrderCountRuleProcessor::process() WC 7.1.0

public function process( $rule, $stored_state ) {
	$count = $this->orders_provider->get_order_count();

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