WC_Coupon::is_type( string $type )

Checks the coupon type.


Description Description


Parameters Parameters

$type

(Required) Array or string of types.


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/class-wc-coupon.php

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


Top ↑

User Contributed Notes User Contributed Notes

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