ACF 与 Woo-commerce 属性冲突
ACF conflict with Woo-commerce attribute
我无法在 woocommerce 中为产品添加属性。它显示此错误。
select2.js:934 Uncaught Error: Option ‘ajax’ is not allowed for
Select2 when attached to a element.
这是与 WooCommerce 和 select2.js 的冲突。
此错误显示是因为 woocommerce 已更新,我认为这将解决您的问题。
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');
我无法在 woocommerce 中为产品添加属性。它显示此错误。
select2.js:934 Uncaught Error: Option ‘ajax’ is not allowed for Select2 when attached to a element.
这是与 WooCommerce 和 select2.js 的冲突。 此错误显示是因为 woocommerce 已更新,我认为这将解决您的问题。
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');