Automattic\WooCommerce\Utilities

OrderUtil::get_order_type()public staticWC 1.0

Returns type pf passed id, post or order object.

Method of the class: OrderUtil{}

No Hooks.

Return

String|null. Type of the order.

Usage

$result = OrderUtil::get_order_type( $order_id );
$order_id(int|WP_Post|WC_Order) (required)
Order ID, post object or order object.

OrderUtil::get_order_type() code WC 8.7.0

public static function get_order_type( $order_id ) {
	return wc_get_container()->get( COTMigrationUtil::class )->get_order_type( $order_id );
}