WC_Product::is_type( string|array $type )

Checks the product type.

Description Description

Backwards compatibility with downloadable/virtual.

Parameters Parameters


(Required) Array or string of types.

Top ↑

Return Return


Top ↑

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 ) ) );

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.