Conditional Expression – ExpressionParser error
-
Hey there.
First of all, lovely plugin, thanks for making this available for all of us.
Having an issue with Conditional Expression:
After setting up the logic, at the frontend (customer) side, the total can’t be calculated and gotExpressionParser: Prepared expression has incorrect type.instead.Here’s the logic:
if{width} * {height} > 1000={width} * {height} * {product_price} * 0.5
else{width} * {height} * {product_price}Where
widthandheightare Number Field type.Whereas using Single Line Formula with
{width} * {height} * {product_price}works.Here’s
debug.log:width = 1 height = 2 product_price = 2 product_weight = product_width = product_height = product_length = product_regular_price = 2 is_user_logged = 1 quantity = 1 PHP Warning: Array to string conversion in path\to\my\weird\wordpress\wp-content\plugins\wc-kalkulator\src\ExpressionParser.php on line 96Using version
1.3.2
The topic ‘Conditional Expression – ExpressionParser error’ is closed to new replies.