ProductCountRuleProcessor
in package
implements
RuleProcessorInterface
Rule processor that performs a comparison operation against the number of products.
Interfaces, Classes and Traits
- RuleProcessorInterface
- Rule processor interface
Table of Contents
- $product_query : WC_Product_Query
- The product query.
- __construct() : mixed
- Constructor.
- process() : bool
- Performs a comparison operation against the number of products.
- validate() : bool
- Validates the rule.
Properties
$product_query
The product query.
protected
WC_Product_Query
$product_query
Methods
__construct()
Constructor.
public
__construct([object $product_query = null ]) : mixed
Parameters
- $product_query : object = null
-
The product query.
Return values
mixed —process()
Performs a comparison operation against the number of products.
public
process(object $rule, object $stored_state) : bool
Parameters
- $rule : object
-
The specific rule being processed by this rule processor.
- $stored_state : object
-
Stored state.
Return values
bool — The result of the operation.validate()
Validates the rule.
public
validate(object $rule) : bool
Parameters
- $rule : object
-
The rule to validate.