Código Javascript :
(function(b,h,f){b.fn.yith_wccl=function(){var a=b(".variations_form"),d=a.data("last_change"),e=a.find(".variations select");this.clean=function(){a.find(".select_box").remove();return this};this.generateOutput=function(){d=a.data("last_change");e.each(function(){var c=b(this),a=b(this).data("type");if("select"!=a)if(c.attr("name")==d)g=c.data("last_content"),g=g.insertAfter(c),g.find(".select_option").off("click").on("click",function(a){b(this).hasClass("selected")?(c.val("").change(),c.removeClass("selected")):
(b(this).data("value"),a=b(this).data("option"),c.append(a).val(a.val()).change(),c.append(a).val(a.val()).change())});else{var g=b("<div />",{"class":"select_box_"+a+" select_box "+c.attr("name")}).insertAfter(c);c.removeData("last_content");c.find("option").each(function(){if(b(this).data("value")){var d="select_option_"+a+" select_option",e=b(this).data("value"),f=b(this),d=b("<div/>",{"class":d}).data("value",e).data("option",f.clone(!0)).appendTo(g).off("click").on("click",function(a){b(this).hasClass("selected")?
Me marca que en esta linea esta el error:
(c.val("").change(),c.removeClass("selected")):(a.preventDefault(),c.val(f.val()).change())});"colorpicker"==a?d.append(b("<span/>",{css:{background:e}})):"image"==a?d.append(b("<img/>",{src:e})):"label"==a&&d.append(b("<span/>",{text:e}))}})}}).filter(function(){return"select"!=b(this).data("type")}).hide()};this.onSelect=function(){e.each(function(){var a=b(this).find("option:selected").data("value"),d=b(this).siblings(".select_box").find(".select_option").removeClass("selected");a&&d.filter(function(){return b(this).data("value")==
--hasta aca--
a}).addClass("selected")})};this.clean();this.generateOutput();this.onSelect();return this};jQuery(function(a){var b=a(".variations_form"),e=b.find(".variations select");a(f).on("check_variations",b,function(){setTimeout(function(){b.yith_wccl()},20)});b.yith_wccl();a(f).on("change",".variations_form .variations select",function(){b.data("last_change",a(this).attr("name"));a(this).data("last_content",a(this).siblings(".select_box").clone(!0))});a(".reset_variations").on("click",function(){setTimeout(function(){e.removeData("last_content");
b.removeData("last_change")},20)})})})(jQuery,window,document);