WC_Product::is_type
Checks the product type.
Backwards compatibility with downloadable/virtual.
Метод класса: WC_Product{}
Хуков нет.
Возвращает
true|false.
Использование
$WC_Product = new WC_Product(); $WC_Product->is_type( $type );
- $type(строка|массив) (обязательный)
- Array or string of types.
Код WC_Product::is_type() WC Product::is type WC 10.5.0
public function is_type( $type ) {
return ( $this->get_type() === $type || ( is_array( $type ) && in_array( $this->get_type(), $type, true ) ) );
}