How to listen to variations events
-
Hello,
I need to style the variations <select> differently, so I’m using this plugin: https://select2.github.io/
I need to instantiate select2 after Woocommerce is done updating the <select> with the available <option>s, otherwise the styled <select> will have all options.
Which event should I listen on? I pretty much tried everything that gets fired in ‘add-to-cart-variation.js’, like this:
jQuery('.bundle_form').on('woocommerce_variation_select_change', function() { //code to instantiate select2 });
The above code only works when I first change a select, whereas I need it to execute on page load (right after woocommerce is done).
Thank you
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to listen to variations events’ is closed to new replies.