Automattic\WooCommerce\Admin\API\Reports\Orders

DataStore::get_orders_with_parent_id()protectedWC 1.0

Returns oreders that have a parent id

Method of the class: DataStore{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_orders_with_parent_id( $orders );
$orders(array) (required)
Orders array.

DataStore::get_orders_with_parent_id() code WC 9.3.3

protected function get_orders_with_parent_id( $orders ) {
	$related_orders = array();
	foreach ( $orders as $order ) {
		if ( '0' !== $order['parent_id'] ) {
			$related_orders[ $order['parent_id'] ] = $order;
		}
	}
	return $related_orders;
}