Automattic\WooCommerce\Utilities
OrderUtil::get_order_type
Returns type pf passed id, post or order object.
Method of the class: OrderUtil{}
No Hooks.
Returns
String|null. Type of the order.
Usage
$result = OrderUtil::get_order_type( $order_id );
OrderUtil::get_order_type() OrderUtil::get order type code WC 10.9.4
public static function get_order_type( $order_id ) {
return wc_get_container()->get( COTMigrationUtil::class )->get_order_type( $order_id );
}