WordPress at Your Fingertips
function is not described

WC_Coupon::is_type() public WC 1.0

Checks the coupon type.

{} It's a method of the class: WC_Coupon{}

No Hooks.

Return

true|false.

Usage

$WC_Coupon = new WC_Coupon();
$WC_Coupon->is_type( $type );
$type(string) (required)
Array or string of types.

Code of WC_Coupon::is_type() WC 5.6.0

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