WordPress at a glance
function is not described

WC_Product_Factory::get_product_type() WC 3.0.0

Get the product type for a product.

This is a method of the class: WC_Product_Factory

Hooks from the method
Return

String/false.

Usage

$var = WC_Product_Factory::get_product_type( $product_id );
$product_id(int) (required)
Product ID.

Changelog

Since 3.0.0 Introduced.

Code of WC Product Factory::get product type: woocommerce/includes/class-wc-product-factory.php WC 3.7.0

<?php
public static function get_product_type( $product_id ) {
	// Allow the overriding of the lookup in this function. Return the product type here.
	$override = apply_filters( 'woocommerce_product_type_query', false, $product_id );
	if ( ! $override ) {
		return WC_Data_Store::load( 'product' )->get_product_type( $product_id );
	} else {
		return $override;
	}
}