WC_Coupon::is_type()publicWC 1.0

Checks the coupon type.

Метод класса: WC_Coupon{}

Хуков нет.

Возвращает

true|false.

Использование

$WC_Coupon = new WC_Coupon();
$WC_Coupon->is_type( $type );
$type(строка|массив) (обязательный)
Array or string of types.

Код WC_Coupon::is_type() WC 8.7.0

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