Title: getting worse, undefined errors
Last modified: April 10, 2024

---

# getting worse, undefined errors

 *  [HamishAhern](https://wordpress.org/support/users/hamishahern/)
 * (@hamishahern)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/getting-worse-undefined-errors/)
 *     ```wp-block-code
       function yith_wapo_set_js_variables() {
           ?>
           <script type="text/javascript">
               document.addEventListener("DOMContentLoaded", function() {
                   // Ensure yith_wapo exists to avoid reference errors
                   if (typeof yith_wapo === 'undefined') {
                       window.yith_wapo = {}; // Initialize as an empty object if it doesn't exist
                   }
   
                   // Set the desired properties
                   yith_wapo.woocommerce_currency_symbol = "$";
                   yith_wapo.woocommerce_currency_pos = "left";
                   yith_wapo.total_thousand_sep = ",";
                   yith_wapo.decimal_sep = ".";
                   yith_wapo.num_decimal = 0;
   
                   // Log the object to confirm (optional)
                   //console.log(yith_wapo);
               });
           </script>
           <?php
       }
       add_action('wp_footer', 'yith_wapo_set_js_variables', 100);
       ```
   
 * my developer had to implement the above fix, after this latest YITH terrible 
   plugin version update.

Viewing 1 replies (of 1 total)

 *  [Iván Sosa](https://wordpress.org/support/users/ivansosa/)
 * (@ivansosa)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/getting-worse-undefined-errors/#post-17690996)
 * Hi there.
 * I’m sorry to read your negative review.
 * I don’t see any open topics about the problem you’re experiencing.
   We kindly 
   suggest that you open a topic before leaving a negative review without any possibility
   of helping you.
 * Thank you for understanding.

Viewing 1 replies (of 1 total)

The topic ‘getting worse, undefined errors’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Iván Sosa](https://wordpress.org/support/users/ivansosa/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/getting-worse-undefined-errors/#post-17690996)