ACF与Woo-commerce属性冲突 [英] ACF conflict with Woo-commerce attribute

查看:84
本文介绍了ACF与Woo-commerce属性冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在woocommerce中向产品添加属性。

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


select2.js:934未捕获错误:
Select2不允许使用选项'ajax'

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


推荐答案

这是与WooCommerce和select2.js的冲突。
此错误表明因为woocommerce已更新,我认为这将解决您的问题。

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');

这篇关于ACF与Woo-commerce属性冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆