Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors

PluginsActivatedRuleProcessor::validate()publicWC 1.0

Validates the rule.

Method of the class: PluginsActivatedRuleProcessor{}

No Hooks.

Return

true|false. Pass/fail.

Usage

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

PluginsActivatedRuleProcessor::validate() code WC 9.0.1

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

	return true;
}