问题概述
将YITH WooCommerce Wishlist与 WPML 结合使用时,您可能会遇到以下问题:您在该插件的 Elementor 小工具(YITH Wishlist Add button)中输入的按钮标签在翻译页面上仍保持为默认语言。
临时解决方法
将 Elementor 小工具中的标签留空。然后,该小工具会使用插件YITHWishlistCustomizationLabels设置中的文本,您可以在WPML字符串翻译中对其进行翻译。
或者前往WPML设置自定义 XML 配置,添加此代码并保存:
XML
<wpml-config><elementor-widgets><widget name="yith_wcwl_add_to_wishlist"><fields><field type="YITH Wishlist: button label" editor_type="LINE">label</field><field type="YITH Wishlist: browse wishlist label" editor_type="LINE">browse_wishlist_text</field><field type="YITH Wishlist: already in wishlist label" editor_type="LINE">already_in_wishslist_text</field><field type="YITH Wishlist: product added label" editor_type="LINE">product_added_text</field></fields></widget></elementor-widgets></wpml-config>