Automattic\WooCommerce\Admin\RemoteInboxNotifications

WCAdminActiveForRuleProcessor::validate()publicWC 1.0

Validates the rule.

Method of the class: WCAdminActiveForRuleProcessor{}

No Hooks.

Return

true|false. Pass/fail.

Usage

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

WCAdminActiveForRuleProcessor::validate() code WC 7.1.0

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

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

	return true;
}