WordPress at Your Fingertips
function is not described

WC_Product::is_type() public WC 1.0

Checks the product type.

Backwards compatibility with downloadable/virtual.

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

No Hooks.

Return

true|false.

Usage

$WC_Product = new WC_Product();
$WC_Product->is_type( $type );
$type(string|array) (required)
Array or string of types.

Code of WC_Product::is_type() WC 5.5.2

<?php
public function is_type( $type ) {
	return ( $this->get_type() === $type || ( is_array( $type ) && in_array( $this->get_type(), $type, true ) ) );
}