getting worse, undefined errors
-
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)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this review.