Automattic\WooCommerce\Admin\RemoteInboxNotifications

BaseLocationStateRuleProcessor::validate()publicWC 1.0

Validates the rule.

{} It's a method of the class: BaseLocationStateRuleProcessor{}

No Hooks.

Return

true|false. Pass/fail.

Usage

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

Code of BaseLocationStateRuleProcessor::validate() WC 7.1.0

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

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

	return true;
}