Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors
PublishBeforeTimeRuleProcessor::process()
Process the rule.
Method of the class: PublishBeforeTimeRuleProcessor{}
No Hooks.
Return
true|false
. Whether the rule passes or not.
Usage
$PublishBeforeTimeRuleProcessor = new PublishBeforeTimeRuleProcessor(); $PublishBeforeTimeRuleProcessor->process( $rule, $stored_state );
- $rule(object) (required)
- The specific rule being processed by this rule processor.
- $stored_state(object) (required)
- Stored state.
PublishBeforeTimeRuleProcessor::process() PublishBeforeTimeRuleProcessor::process code WC 9.7.1
public function process( $rule, $stored_state ) { return $this->date_time_provider->get_now() <= new \DateTime( $rule->publish_before ); }