问题概述
将 WooCommerce Private Store 与 WPML 一起使用时,开启了“Add to Private Store”的页面的翻译不受保护,因此其内容是公开的。此外,“Redirect after login”会将每种语言的访客引导至同一页面。
临时解决方法
- 前往 WPML设置自定义 XML 配置,添加以下 XML 并保存:
XML
<wpml-config> <custom-fields> <custom-field action="copy">wcps_page_is_protected</custom-field> </custom-fields> <admin-texts> <key name="wcps_store_redirect" /> </admin-texts> </wpml-config>
- 请在翻译受保护的页面之前执行此操作。对于已翻译的页面,请在每个翻译上勾选“添加到私密商店”。
- 在 WPML字符串翻译 中翻译“登录后重定向”URL。