问题概述
将Woodmart与 WPML 结合使用时,您可能会遇到产品属性的色板样式选项未复制到已翻译产品的情况。因此,属性在不同语言之间的显示方式可能会有所不同,例如在默认语言中显示为下拉菜单,而在翻译中显示为内联。
当前文档:颜色色板可在已翻译的产品上正常工作。请阅读使用 WPML 翻译 WoodMart 商店了解更多信息。
临时解决方法
此问题已在 Woodmart 8.5.2 中修复。 更新即可在您的站点上解决此问题,因此只有在您还无法更新时,才需要此临时解决方法。
- 在您的 WordPress 仪表盘中,转到WPML设置自定义 XML 配置。
- 添加以下 XML 配置并保存:
<wpml-config> <custom-fields> <custom-field action="copy" label="Swatches Attribute">_woodmart_swatches_attribute</custom-field> </custom-fields> <custom-term-fields> <custom-term-field action="copy" label="Swatches Dropdown">not_dropdown</custom-term-field> </custom-term-fields> </wpml-config>