How to Get Order Details From Order ID

By Prem Tiwari in WooCommerce. Updated on


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:

Sharing is caring!


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.

You might also like:

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.