Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableDataStore::get_cpt_order()privateWC 1.0

Get the post type order representation.

Метод класса: 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.

Code of OrdersTableDataStore::get_cpt_order() WC 7.1.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;
}