WC_Coupon::is_type()
Checks the coupon type.
Method of the class: WC_Coupon{}
No Hooks.
Return
true|false
.
Usage
$WC_Coupon = new WC_Coupon(); $WC_Coupon->is_type( $type );
- $type(string|array) (required)
- Array or string of types.
WC_Coupon::is_type() WC Coupon::is type code WC 9.3.3
public function is_type( $type ) { return ( $this->get_discount_type() === $type || ( is_array( $type ) && in_array( $this->get_discount_type(), $type, true ) ) ); }