Automattic\WooCommerce\Internal\Utilities
COTMigrationUtil::get_order_type()
Returns type pf passed id, post or order object.
Method of the class: COTMigrationUtil{}
No Hooks.
Return
String|null
. Type of the order.
Usage
$COTMigrationUtil = new COTMigrationUtil(); $COTMigrationUtil->get_order_type( $order_id );
COTMigrationUtil::get_order_type() COTMigrationUtil::get order type code WC 9.8.2
public function get_order_type( $order_id ) { $order_id = $this->get_post_or_order_id( $order_id ); $order_data_store = \WC_Data_Store::load( 'order' ); return $order_data_store->get_order_type( $order_id ); }