1

I want to display 'Price' and 'Payment method' for a specific order with get_formatted_order_total(), all I know is order_number.

What is the best way to get this formatted order total for a specific order?

LoicTheAztec
  • 184,753
  • 20
  • 224
  • 275
Geri
  • 21
  • 2

1 Answers1

1

Since it is a public function , you can use ,

$order = new WC_Order($order_id);
$string = $order->get_formatted_order_total();
Ahmed Ginani
  • 6,060
  • 1
  • 11
  • 31