WC_Product::is_type( string|array $type )
Checks the product type.
Description Description
Backwards compatibility with downloadable/virtual.
Parameters Parameters
- $type
-
(Required) Array or string of types.
Return Return
(bool)
Source Source
File: includes/abstracts/abstract-wc-product.php
public function is_type( $type ) { return ( $this->get_type() === $type || ( is_array( $type ) && in_array( $this->get_type(), $type, true ) ) ); }