wc_get_order_type()WC 1.0

Get an order type by post type name.

Хуков нет.

Возвращает

true|false|Массив. Details about the order type.

Использование

wc_get_order_type( $type );
$type(строка) (обязательный)
Post type name.

Код wc_get_order_type() WC 8.7.0

function wc_get_order_type( $type ) {
	global $wc_order_types;

	if ( isset( $wc_order_types[ $type ] ) ) {
		return $wc_order_types[ $type ];
	}

	return false;
}