How to Get Order Details From Order ID

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:

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.


Article Tags: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.