WordPress at Your Fingertips
function is not described

WC_Product::get_type() public WC 3.0.0

Get internal type. Should return string and should be overridden by child classes.

The product_type property is deprecated but is used here for BW compatibility with child classes which may be defining product_type and not have a get_type method.

{} It's a method of the class: WC_Product{}

No Hooks.

Return

String.

Usage

$WC_Product = new WC_Product();
$WC_Product->get_type();

Changelog

Since 3.0.0 Introduced.

Code of WC_Product::get_type() WC 5.8.0

public function get_type() {
	return isset( $this->product_type ) ? $this->product_type : 'simple';
}