Title: Conditional logic character error
Last modified: June 10, 2022

---

# Conditional logic character error

 *  Resolved [digialityco](https://wordpress.org/support/users/digialityco/)
 * (@digialityco)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/conditional-logic-character-error/)
 * I am attempting to set up the following formula:
 * Length A * Length B * Finishing Style
 * Finishing style can be either 0.0275 or 0.0375
 * I am using conditional logic as follows:
    Lenght A * Length B * Finishing Style
   < 60 = 60
 * You’ll see if the cost is less than $60, it needs to be a $60 minimum. When I
   use “less than” < it turns into < and results this error:
 * Total Unexpected character “;” around position 47 for expression `side_a_length*
   side_b_length*finishing_style < 60`.
 * Is my formula syntax incorrect or is there a way to stop < from turning into 
   < ?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconditional-logic-character-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Krzysztof Piątkowski](https://wordpress.org/support/users/wckalkulator/)
 * (@wckalkulator)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/conditional-logic-character-error/#post-15729366)
 * You are right. I fixed it in v.1.1.5.
 *  Thread Starter [digialityco](https://wordpress.org/support/users/digialityco/)
 * (@digialityco)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/conditional-logic-character-error/#post-15733138)
 * Thanks, it’s working great!
 *  Thread Starter [digialityco](https://wordpress.org/support/users/digialityco/)
 * (@digialityco)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/conditional-logic-character-error/#post-15734204)
 * I am now getting a ‘bad request’ response, but haven’t changed anything about
   the formula. Any thoughts?
 * Staging here: [https://staging3.digiality.co/product/get-your-quilt-on/](https://staging3.digiality.co/product/get-your-quilt-on/)
 *  Thread Starter [digialityco](https://wordpress.org/support/users/digialityco/)
 * (@digialityco)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/conditional-logic-character-error/#post-15741170)
 * [@wckalkulator](https://wordpress.org/support/users/wckalkulator/)
    I am now 
   getting a ‘bad request’ response, but haven’t changed anything about the formula.
   Any thoughts?
 * Staging here: [https://staging3.digiality.co/product/get-your-quilt-on/](https://staging3.digiality.co/product/get-your-quilt-on/)
 *  Plugin Author [Krzysztof Piątkowski](https://wordpress.org/support/users/wckalkulator/)
 * (@wckalkulator)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/conditional-logic-character-error/#post-15741305)
 * Hello, I’ve just got notification because you called me with “@”. Sorry for late
   reply.
 * I’ve just uploaded v.1.2.3. The issue was in JS. I used selector $(“.summary 
   form”).serialize(). You have no .summary wrapper around “form” tag. In v.1.2.3
   I changed selector to $(“form.cart”).serialize() which fixed this issue.
 * “Bad request” is thrown when:
    – nonce is invalid – there’s no _wck_hash and 
   _wck_product_id in POST data In this case there was no _wck_hash and _wck_product_id
   in POST data because $(“.summary form”) was not found.
 * Please call me @wckalkuator on next issues or create a new thread.
 *  Plugin Author [Krzysztof Piątkowski](https://wordpress.org/support/users/wckalkulator/)
 * (@wckalkulator)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/conditional-logic-character-error/#post-15741306)
 * Fixed in v.1.2.3. My detailed answer has been held for moderation by automated
   system and will be manually reviewed by a moderator.
    [@moderator](https://wordpress.org/support/users/moderator/)–
   please delete this answer.
    -  This reply was modified 3 years, 11 months ago by [Krzysztof Piątkowski](https://wordpress.org/support/users/wckalkulator/).
 *  Thread Starter [digialityco](https://wordpress.org/support/users/digialityco/)
 * (@digialityco)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/conditional-logic-character-error/#post-15744532)
 * [@wckalkulator](https://wordpress.org/support/users/wckalkulator/) Appreciate
   your quick responses and support. This does seem to be fixed now. My final question
   for you, is it possible to hide the error message if a user hasn’t chosen an 
   option yet? Or can I change what it states?
 * When a user hasn’t chosen an option, it states this as the total:
    Total Variable“
   finishing_style” is not valid around position 29 for expression `side_a_length*
   side_b_length*finishing_style < 60`.
 *  Plugin Author [Krzysztof Piątkowski](https://wordpress.org/support/users/wckalkulator/)
 * (@wckalkulator)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/conditional-logic-character-error/#post-15744700)
 * Hello, error messages are for debug purposes and are showed only for admin or
   shop manager. General, any user with capability ‘manage_woocommerce’. Try to 
   view product page as a guest. There’s no error message.
 * This may be confusing, so I’m going to add simple setting to show error messages
   for admin.
 * You can also check default selected option for radio options.
 *  Thread Starter [digialityco](https://wordpress.org/support/users/digialityco/)
 * (@digialityco)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/conditional-logic-character-error/#post-15744719)
 * [@wckalkulator](https://wordpress.org/support/users/wckalkulator/) Just viewed
   not logged in as admin. It’s great as is. Thank you!
 *  Plugin Author [Krzysztof Piątkowski](https://wordpress.org/support/users/wckalkulator/)
 * (@wckalkulator)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/conditional-logic-character-error/#post-15744731)
 * [@digialityco](https://wordpress.org/support/users/digialityco/) Please rate 
   this plugin if you like it 🙂
    -  This reply was modified 3 years, 11 months ago by [Krzysztof Piątkowski](https://wordpress.org/support/users/wckalkulator/).

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Conditional logic character error’ is closed to new replies.

 * ![](https://ps.w.org/wc-kalkulator/assets/icon-256x256.gif?rev=2767665)
 * [Product Fields, Addons and Price Calculator for WooCommerce](https://wordpress.org/plugins/wc-kalkulator/)
 * [Support Threads](https://wordpress.org/support/plugin/wc-kalkulator/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-kalkulator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-kalkulator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-kalkulator/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [Krzysztof Piątkowski](https://wordpress.org/support/users/wckalkulator/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/conditional-logic-character-error/#post-15744731)
 * Status: resolved