Automattic\WooCommerce\Internal\DataStores\Orders
OrdersTableDataStore::get_order_data_for_id()
Return order data for a single order ID.
Method of the class: OrdersTableDataStore{}
No Hooks.
Return
Object|\WP_Error
. DB order object or WP_Error.
Usage
// private - for code of main (parent) class only $result = $this->get_order_data_for_id( $id );
- $id(int) (required)
- Order ID.
OrdersTableDataStore::get_order_data_for_id() OrdersTableDataStore::get order data for id code WC 9.3.3
private function get_order_data_for_id( $id ) { $results = $this->get_order_data_for_ids( array( $id ) ); return is_array( $results ) && count( $results ) > 0 ? $results[ $id ] : $results; }