How to Get Order Details From Order ID

Prem Tiwari - - WooCommerce

Hi, friend, this is very quick tutorials which help you create custom email subject for WooCommerce online store orders. By default, WooCommerce sends the standard subject line, but if you want to change or want to add some other order details then you can do by using filters.

Below is the list of all data of your order. You can use as per your requirement. Use this function to get all order data $array = WC_API_Orders::get_order( $id, $fields, $filter );. In this function $id is your order and $fields, $filter are optional parameters. It will return the array with complete order data.

Function source file name: woocommerce/includes/api/legacy/v2/class-wc-api-orders.php Below is the complete function:

About: Prem Tiwari

Prem Tiwari is the founder of and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.

Tags: , , ,