Automattic\WooCommerce\Admin\RemoteInboxNotifications

PluginVersionRuleProcessor::validate()publicWC 1.0

Validates the rule.

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

No Hooks.

Return

true|false. Pass/fail.

Usage

$PluginVersionRuleProcessor = new PluginVersionRuleProcessor();
$PluginVersionRuleProcessor->validate( $rule );
$rule(object) (required)
The rule to validate.

Code of PluginVersionRuleProcessor::validate() WC 7.1.0

public function validate( $rule ) {
	if ( ! isset( $rule->plugin ) ) {
		return false;
	}

	if ( ! isset( $rule->version ) ) {
		return false;
	}

	if ( ! isset( $rule->operator ) ) {
		return false;
	}

	return true;
}