Recently we updated WooCommerce from 2.5.2 to 5.2.0. We fixed most of the errors related to the update, but there is one issue with the selectWoo library and product attributes on the edit page.
Basically, we’ve noticed that there are no attribute values on the product edit page in the admin panel both for new products and for products that exist before the update. When I looked in the developer’s tools in Chrome, I’ve noticed that there are no “<option>” tags in “<select>” tags of the attributes. If I disable JS and reload the page, then all values are there, so there is no problem with DB or PHP side I believe.
Also, when I replaced all “selectWoo” functions in the wp-content/plugins/woocommerce/assets/js/admin/wc-enhanced-select.js file with “select2” functions, for example
$( this ).selectWoo( select2_args ).addClass( 'enhanced' );
to
$( this ).select2( select2_args ).addClass( 'enhanced' );
and reloaded the page with JS enabled, all worked well, all “<option>” tags with values were inside all “<select>” tags, and everything worked fine.
Also, if I use the original wc-enhanced-select.js with selectWoo functions and on the edit page click on the “Add” button to add an attribute, then that attribute adds as expected and it works. Of course, if I then save the attribute value by clicking the “Save attributes” button, then old attributes with “empty” values will be erased because in the save request there will be no values for them.
Any idea why the attributes that already on the page aren’t working and attributes that were added after the page loaded are working? And why if I change selectWoo function calls to select2 all works fine?
Please update me if you need more information.
Thank you!
jquery.min.js?ver=3.5.1:2 Uncaught Error: No select2/compat/dropdownCss
at j (selectWoo.min.js?ver=1.0.8:1)
at o (selectWoo.min.js?ver=1.0.8:1)
at selectWoo.min.js?ver=1.0.8:1
at D.apply (selectWoo.min.js?ver=1.0.8:1)
at new e (selectWoo.min.js?ver=1.0.8:1)
at new e (selectWoo.min.js?ver=1.0.8:1)
at HTMLSelectElement.<anonymous> (selectWoo.min.js?ver=1.0.8:1)
at Function.each (jquery.min.js?ver=3.5.1:2)
at s.fn.init.each (jquery.min.js?ver=3.5.1:2)
at s.fn.init.a.fn.selectWoo (selectWoo.min.js?ver=1.0.8:1)
If I disable everest it works fine and wooccommerce by default loads:
selectWoo.full.min.js
When everest is enabled it overwrites this with: selectWoo.min.js
Not sure why you’re loading that on the checkout anyway?
Thanks
]]>That’s tested with the plain vanilla Storefront theme.
]]>De pagina blijft in een soort loop zodra de verzendopties van myparcel geactiveerd zijn. De foutmelding die zich herhaald:
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as ‘passive’ to make the page more responsive. See <URL>
selectWoo.full.min.js?ver=1.0.6:16 [Violation] Added non-passive event listener to a scroll-blocking ‘wheel’ event. Consider marking event handler as ‘passive’ to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
setup @ selectWoo.full.min.js?ver=1.0.6:16
add @ jquery.js?ver=1.12.4-wp:3
(anonymous) @ jquery.js?ver=1.12.4-wp:3
each @ jquery.js?ver=1.12.4-wp:2
each @ jquery.js?ver=1.12.4-wp:2
… en zo nog wat langer door.
Wat denken jullie dat hier de oorzaak is?
]]>Nothing what I’ve found works… Need Your help.
]]>Our standard select boxes work, but when we apply selectwoo() to them it appears to select the correct item, but it doesn’t refine the other select boxes or display the price. We’re guessing the ajax for doing this isn’t firing, but can’t figure out why (we’ve been searching for ages).
This is our code:
<link rel="stylesheet" href="<?php bloginfo('template_url');?>/css/selectWoo.min.css" />
<script src="<?php bloginfo('template_url');?>/assets/js/selectWoo.min.js"></script>
<script>
$(document).ready(function() {
$('.product-wrapper select').selectWoo();
});
</script>
What are we missing?
Thanks
]]>The line items are being sorted when we select them from the autocomplete list. Found out that the WooCommerce uses selectWoo (a modified version of select2 jQuery plugin).
Disabling sorting the items is very helpful when an order has lot of items (assume 100+) which are given in written format. It will be easy to cross check the items added and the list.
Suggestion/solution are most welcome
]]>