Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 get_formatted_order_total() 显示特定订单的“价格”和“付款方式”,我只知道 order_number。
获取特定订单的格式化订单总额的最佳方法是什么?
由于它是一个公共功能,您可以使用,
$order = new WC_Order($order_id); $string = $order->get_formatted_order_total();