Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors
BaseLocationCountryRuleProcessor::validate()
Validates the rule.
Метод класса: BaseLocationCountryRuleProcessor{}
Хуков нет.
Возвращает
true|false
. Pass/fail.
Использование
$BaseLocationCountryRuleProcessor = new BaseLocationCountryRuleProcessor(); $BaseLocationCountryRuleProcessor->validate( $rule );
- $rule(объект) (обязательный)
- The rule to validate.
Код BaseLocationCountryRuleProcessor::validate() BaseLocationCountryRuleProcessor::validate WC 9.3.3
public function validate( $rule ) { if ( ! isset( $rule->value ) ) { return false; } if ( ! isset( $rule->operation ) ) { return false; } return true; }