ACF conflict with Woo-commerce attribute

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 04:58:46

问题


I can't add attributes to products in woocommerce. It shows this error.

select2.js:934 Uncaught Error: Option ‘ajax’ is not allowed for Select2 when attached to a element.


回答1:


it is a Conflict with WooCommerce and select2.js. this error shows beacause woocommerce is updated i think this will solve your problem.

add_action('init', function() { define('SELECT2_NOCONFLICT', true); }, 1);
 function my_acf_init()
{
 acf_update_setting('select2_version', 4);
}
add_action('acf/init', 'my_acf_init');


来源:https://stackoverflow.com/questions/46237329/acf-conflict-with-woo-commerce-attribute

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!