Title: Conditional logic stopped working
Last modified: August 15, 2023

---

# Conditional logic stopped working

 *  [MC](https://wordpress.org/support/users/moscomes/)
 * (@moscomes)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-logic-stopped-working/)
 * Hi,
 * I have YITH PAO updated to the latest version (free-version) and somehow I can’t
   get the conditional logic to work on some elements as it did before updating.
 * For example, on given page there is an option to add a custom text to the product.
   Before, if you checked the checkbox (“Ja, ik wil een opdruk (+2,00)”), a sum 
   of options (input field, dropdowns etc.) would appear to further specify the 
   choosen option. Which now it doesn’t anymore. Same goes for the other option “
   Extra sier-vlokken toevoegen (+1,00)”.
   I tried finding a solution by changing
   the conditions, I tried with disabeled caching, disabled some other plugins, 
   adding completely new ‘options’… however, without any success.Hope someone is
   able to help me. Also, it completely changed the layout of the yith block after
   the update.
 * Thanks!
    -  This topic was modified 2 years, 9 months ago by [MC](https://wordpress.org/support/users/moscomes/).
      Reason: spelling
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconditional-logic-stopped-working%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Iván Sosa](https://wordpress.org/support/users/ivansosa/)
 * (@ivansosa)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-logic-stopped-working/#post-16979967)
 * Hi there,
 * The conditional logic should be added inside the add-on configuration (Conditional
   logic tab).
 * Could you send us a screenshot with that configuration, please?
   We just tested
   the conditional logic rules in a local installation and they are working as expected.
 * Have a nice day!
    -  This reply was modified 2 years, 9 months ago by [Iván Sosa](https://wordpress.org/support/users/ivansosa/).
 *  [kowallab](https://wordpress.org/support/users/kowallab/)
 * (@kowallab)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-logic-stopped-working/#post-16980148)
 * It doesn’t work for me either: [https://ibb.co/zmLzf8Y](https://ibb.co/zmLzf8Y)
    -  This reply was modified 2 years, 9 months ago by [kowallab](https://wordpress.org/support/users/kowallab/).
 *  Thread Starter [MC](https://wordpress.org/support/users/moscomes/)
 * (@moscomes)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-logic-stopped-working/#post-16980198)
 * Hi and thank you for the response!
 * ![](https://i0.wp.com/i.ibb.co/TMPMJV1/Schermafbeelding-2023-08-17-141058.png?
   resize=537%2C322&ssl=1)
 * These are the settings for radiobuttons that need to appear whenever ‘Extra siervlokken(…)’
   is checked.
 * Settings translation: Show > all rules > when ‘Extra siervlokken (…)’ > is selected
   
   On the provided URL it’s the last option/checkbox. Nothing happens when checked.
   Same goes for the checkbox above it; nothing happens when checked. Please find
   screenshot below for clarity:
 * ![](https://i0.wp.com/i.ibb.co/DfPqy3j/Schermafbeelding-2023-08-17-141558.png?
   ssl=1)
 * This all used to work perfectly before, but stopped working after updating the
   plugin.
    -  This reply was modified 2 years, 9 months ago by [MC](https://wordpress.org/support/users/moscomes/).
    -  This reply was modified 2 years, 9 months ago by [MC](https://wordpress.org/support/users/moscomes/).
      Reason: added translation
 *  Thread Starter [MC](https://wordpress.org/support/users/moscomes/)
 * (@moscomes)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-logic-stopped-working/#post-16983125)
 * In addition to my previous reply: I just came to notice it also doesn’t add the
   product to the shopping-cart anymore. (For completeness: without checking the
   non-functioning checkboxes). 
   I checked the log, and it gives an error:
 * “CRITICAL Uncaught TypeError: Cannot access offset of type string on string in(…)
   public_html/wp-content/plugins/yith-woocommerce-product-add-ons/includes/class-
   yith-wapo-cart.php:155”
 * All in all I gave everything a thorough look and have several issues after updating
   the plugin:
    - Conditional logic not functioning, as mentioned in OP
    - Doesn’t add product to cart, as mentioned above
    - Additionally and less critical: some elements now have inline styling with‘!
      important’ (75% width f.e.), which caused the layout to change and overruled
      previously applied CSS
    - Doesn’t calculate the total price when options with an additional fee are 
      applied. (used to work, no changes to settings. I disabled it on frontend 
      for now)
 * All was working before updating.
 * If you need any additional information I’m happy to provide.
 * Thanks
 *  Thread Starter [MC](https://wordpress.org/support/users/moscomes/)
 * (@moscomes)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-logic-stopped-working/#post-16994309)
 * Update:
   I’ve seen other tickets mentioning the ‘not adding to cart’ issue for
   which you give a solution in the form of disabling AJAX. However, in my case 
   the product used to be succesfully added to the cart with AJAX enabled, before
   updating. But the main issue with the given solution is that disabling AJAX has
   a huge impact on the website. For now I have disabled AJAX for products which
   have YITH PAO functionality. In my case those are from a specific category and
   therefore easy to bypass, but it’s far from ideal.I still haven’t found a solution
   for the main problem as mentioned in the OP (conditional logic) and hope you 
   are still able to help me with that.
 *  [Iván Sosa](https://wordpress.org/support/users/ivansosa/)
 * (@ivansosa)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-logic-stopped-working/#post-16995567)
 * Hi there,
 * We are going to start at the beginning, just to clear up doubts about any possible
   conflict that we may have with a plugin.
   I repeat, we have done different tests
   with the add-ons on conditional logic and this still works correctly.I have a
   slight suspicion that the problem could be related to your site’s cache.
 * Please follow the steps in this first part:
    - Deactivate all plugins you currently have activated on your site except WooCommerce
      and YITH WooCommerce Product Add-ons & Extra Options.
    - Change the current theme that you are using, to also rule out that the theme
      is generating some unexpected problem.
 * Check it and let us know your results, please.
 * Have a great day.

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

The topic ‘Conditional logic stopped working’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-product-add-ons/assets/icon-128x128.gif?
   rev=3142291)
 * [YITH WooCommerce Product Add-Ons](https://wordpress.org/plugins/yith-woocommerce-product-add-ons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-product-add-ons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-product-add-ons/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-product-add-ons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-product-add-ons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-product-add-ons/reviews/)

## Tags

 * [conditional logic](https://wordpress.org/support/topic-tag/conditional-logic/)
 * [Conditions](https://wordpress.org/support/topic-tag/conditions/)

 * 6 replies
 * 3 participants
 * Last reply from: [Iván Sosa](https://wordpress.org/support/users/ivansosa/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-logic-stopped-working/#post-16995567)
 * Status: not resolved