WC_Coupon::is_type() public WC 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 Coupon::is type WC 5.0.0
public function is_type( $type ) {
return ( $this->get_discount_type() === $type || ( is_array( $type ) && in_array( $this->get_discount_type(), $type, true ) ) );
}