Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors
ProductCountRuleProcessor::process()
Performs a comparison operation against the number of products.
Метод класса: ProductCountRuleProcessor{}
Хуков нет.
Возвращает
true|false
. The result of the operation.
Использование
$ProductCountRuleProcessor = new ProductCountRuleProcessor(); $ProductCountRuleProcessor->process( $rule, $stored_state );
- $rule(объект) (обязательный)
- The specific rule being processed by this rule processor.
- $stored_state(объект) (обязательный)
- Stored state.
Код ProductCountRuleProcessor::process() ProductCountRuleProcessor::process WC 9.2.3
public function process( $rule, $stored_state ) { $products = $this->product_query->get_products(); return ComparisonOperation::compare( $products->total, $rule->value, $rule->operation ); }