Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableDataStore::get_cpt_order()privateWC 1.0

Get the post type order representation.

Method of the class: OrdersTableDataStore{}

No Hooks.

Return

\WC_Order. Order object.

Usage

// private - for code of main (parent) class only
$result = $this->get_cpt_order( $post );
$post(\WP_Post) (required)
Post object.

OrdersTableDataStore::get_cpt_order() code WC 8.7.0

private function get_cpt_order( $post ) {
	$cpt_order = new \WC_Order();
	$cpt_order->set_id( $post->ID );
	$cpt_data_store = $this->get_cpt_data_store_instance();
	$cpt_data_store->read( $cpt_order );
	return $cpt_order;
}