WordPress at a glance
function is not described


OptionRuleProcessor::process() public WC 1.0

Performs a comparison operation against the option value.

{} It's a method of the class: OptionRuleProcessor{}

No Hooks.


true|false. The result of the operation.


$OptionRuleProcessor = new OptionRuleProcessor();
$OptionRuleProcessor->process( $rule, $stored_state );
$rule(object) (required)
The specific rule being processed by this rule processor.
$stored_state(object) (required)
Stored state.

Code of OptionRuleProcessor::process() WC 5.3.0

public function process( $rule, $stored_state ) {
	$default_value = 'contains' === $rule->operation ? array() : false;
	$default       = isset( $rule->default ) ? $rule->default : $default_value;
	$option_value  = get_option( $rule->option_name, $default );

	return ComparisonOperation::compare(