Automattic\WooCommerce\Admin\RemoteInboxNotifications

BaseLocationCountryRuleProcessor::validate()publicWC 1.0

Validates the rule.

Method of the class: BaseLocationCountryRuleProcessor{}

No Hooks.

Return

true|false. Pass/fail.

Usage

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

BaseLocationCountryRuleProcessor::validate() code WC 7.1.0

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

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

	return true;
}