- 状态
- 已解决
- 报告针对
- WPML Multilingual & Multicurrency for WooCommerce 3.4.3
- 解决于
- WooCommerce Multilingual 3.4.4
问题概述
当使用此处 http://docs.woothemes.com/document/show-cart-contents-total/ 建议的代码片段显示购物车总计时,切换到不同语言后总计显示不正确。
重现步骤:
- - 两种语言和两种货币:英语(货币:GBP)和德语(货币:EUR)
- - 将 http://docs.woothemes.com/document/show-cart-contents-total/ 中的第一段代码(无 AJAX)放入页眉中。将其命名为“Custom header cart”。
- - 创建产品的英语和德语版本:10 GBP 和 20 USD
- - 将英语版本的产品添加到购物车。
- - “Custom header cart”显示正确的货币:10 GBP
- - 切换到德语
- - “Custom header cart”显示错误:10 USD
- - 刷新当前的德语页面,现在“Custom header cart”显示正确:20 USD
临时解决方法
作为临时解决方案,用户可以在 global $woocommerce 和实际的代码片段之后添加 $woocommerce->cart->calculate_totals()。
将在下一个版本中修复。