This is what is written on official woocommerce support:
“WooCommerce 3.0 uses Select2 v4 due to the many fixes and enhancements added since Select2 v3. This version is however incompatible with v3.”
And this is an error I get when trying to add an attribute to my product. I have the newest version of Royal theme.
wc-enhanced-select.min.js:1 Error: Option 'ajax' is not allowed for Select2 when attached to a <select> element.
at String.<anonymous> (ultimate-woocomposer-backend.min.js:1)
at Function.each (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2)
at d.prepareOpts (ultimate-woocomposer-backend.min.js:1)
at d.prepareOpts (ultimate-woocomposer-backend.min.js:2)
at d.init (ultimate-woocomposer-backend.min.js:1)
at HTMLSelectElement.<anonymous> (ultimate-woocomposer-backend.min.js:2)
at Function.each (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2)
at a.fn.init.each (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2)
at a.fn.init.a.fn.select2 (ultimate-woocomposer-backend.min.js:2)
at HTMLSelectElement.<anonymous> (wc-enhanced-select.min.js:1)
ultimate-woocomposer-backend.min.js:1 Uncaught Error: Option 'ajax' is not allowed for Select2 when attached to a <select> element.
at String.<anonymous> (ultimate-woocomposer-backend.min.js:1)
at Function.each (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2)
at d.prepareOpts (ultimate-woocomposer-backend.min.js:1)
at d.prepareOpts (ultimate-woocomposer-backend.min.js:2)
at d.init (ultimate-woocomposer-backend.min.js:1)
at HTMLSelectElement.<anonymous> (ultimate-woocomposer-backend.min.js:2)
at Function.each (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2)
at a.fn.init.each (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2)
at a.fn.init.a.fn.select2 (ultimate-woocomposer-backend.min.js:2)
at HTMLSelectElement.<anonymous> (wc-enhanced-select.min.js:1)
(anonymous) @ ultimate-woocomposer-backend.min.js:1
each @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
prepareOpts @ ultimate-woocomposer-backend.min.js:1
prepareOpts @ ultimate-woocomposer-backend.min.js:2
init @ ultimate-woocomposer-backend.min.js:1
(anonymous) @ ultimate-woocomposer-backend.min.js:2
each @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
each @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
a.fn.select2 @ ultimate-woocomposer-backend.min.js:2
(anonymous) @ wc-enhanced-select.min.js:1
each @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
each @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
(anonymous) @ wc-enhanced-select.min.js:1
dispatch @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:3
r.handle @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:3
trigger @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:3
a.event.trigger @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:9
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:3
each @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
each @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
trigger @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:3
(anonymous) @ meta-boxes-product.min.js:1
i @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
fireWith @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
y @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:4
c @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:4