WooCommerce Code Reference

ComparisonOperation
in package

Compare two operands using the specified operation.

Table of Contents

compare()  : mixed
Compare two operands using the specified operation.

Methods

compare()

Compare two operands using the specified operation.

public static compare(object $left_operand, object $right_operand, string $operation) : mixed
Parameters
$left_operand : object

The left hand operand.

$right_operand : object

The right hand operand -- 'value' from the rule definition.

$operation : string

The operation used to compare the operands.

Return values
mixed