WCAdminActiveForRuleProcessor
in package
implements
RuleProcessorInterface
Rule processor for publishing if wc-admin has been active for at least the given number of seconds.
Interfaces, Classes and Traits
- RuleProcessorInterface
- Rule processor interface
Table of Contents
- $wcadmin_active_for_provider : WCAdminActiveForProvider
- Provides the amount of time wcadmin has been active for.
- __construct() : mixed
- Constructor
- process() : bool
- Performs a comparison operation against the amount of time wc-admin has been active for in days.
- validate() : bool
- Validates the rule.
Properties
$wcadmin_active_for_provider
Provides the amount of time wcadmin has been active for.
protected
WCAdminActiveForProvider
$wcadmin_active_for_provider
Methods
__construct()
Constructor
public
__construct([object $wcadmin_active_for_provider = null ]) : mixed
Parameters
- $wcadmin_active_for_provider : object = null
-
Provides the amount of time wcadmin has been active for.
Return values
mixed —process()
Performs a comparison operation against the amount of time wc-admin has been active for in days.
public
process(object $rule, object $stored_state) : bool
Parameters
- $rule : object
-
The rule being processed.
- $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.