- 状态
- 等待作者
- 主题标签
- Compatibility
问题概述
使用YITH WooCommerce Badge Management Premium时,分配给产品的徽章不会显示在其翻译版本上。出现此问题是因为徽章显示所需的某些元数据未复制或同步到翻译后的产品中。
临时解决方法
在继续操作之前,请确保已对您的站点进行了完整备份。
1. 添加自定义 XML 配置
- 前往 WPML > 设置 > 自定义 XML 配置
- 粘贴以下代码并单击“保存”
<wpml-config> <custom-fields> <custom-field action="copy">_yith_wcbm_badge_from_date</custom-field> <custom-field action="copy">_yith_wcbm_badge_ids</custom-field> <custom-field action="copy">_yith_wcbm_badge_schedule</custom-field> <custom-field action="copy">_yith_wcbm_badge_to_date</custom-field> </custom-fields> </wpml-config>
2. 将徽章文章类型设置为“不可翻译”
- 前往 WPML > 设置 > 文章类型翻译
- 找到徽章(yith-wcbm-badge)并将其设置为不可翻译
3. 翻译徽章文本
- 前往 WPML > 字符串翻译
- 在 yith-woocommerce-badges-management 域下找到徽章文本并进行翻译。