WC_Order_Data_Store_CPT::get_order_type()publicWC 3.0.0

Get the order type based on Order ID.

Method of the class: WC_Order_Data_Store_CPT{}

No Hooks.

Return

String.

Usage

$WC_Order_Data_Store_CPT = new WC_Order_Data_Store_CPT();
$WC_Order_Data_Store_CPT->get_order_type( $order );
$order(int|WP_Post) (required)
Order | Order id.

Changelog

Since 3.0.0 Introduced.

WC_Order_Data_Store_CPT::get_order_type() code WC 9.4.2

public function get_order_type( $order ) {
	return get_post_type( $order );
}