Hi everyone I have this configuration in my woocommerce
And in my product I have this
但当我显示价格时,它返回“4.95”而不是“4,95”
我用这个来获取价格
$price = get_post_meta( get_the_ID(), '_regular_price', true);
任何想法!
Use the wc_price
函数来格式化数字。
$price = get_post_meta( get_the_ID(), '_regular_price', true);
$formatted_price = wc_price( $price );
注意:对于 woocommerce_price.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)