首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >get_discount_total()和get_total_discount()之间的区别?

get_discount_total()和get_total_discount()之间的区别?
EN

Stack Overflow用户
提问于 2020-01-13 06:01:57
回答 1查看 1.1K关注 0票数 6

get_total_discount()get_discount_total().中,我注意到在WC_CartWC_Order中都有

这两者有什么区别呢?我应该用哪一个来获得购物车/订单折扣的价值?

EN

回答 1

Stack Overflow用户

发布于 2020-01-13 06:07:12

有趣的。我以前没注意到。

get_total_discount将返回折扣的格式化值(带有货币符号,用HTML包装)。

get_discount_total只返回值。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59711257

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档