WC_Order_Item_Coupon::offsetExists()publicWC 1.0ReturnTypeWillChange

OffsetExists for ArrayAccess.

Method of the class: WC_Order_Item_Coupon{}

No Hooks.

Return

true|false.

Usage

$WC_Order_Item_Coupon = new WC_Order_Item_Coupon();
$WC_Order_Item_Coupon->offsetExists( $offset );
$offset(string) (required)
Offset.

WC_Order_Item_Coupon::offsetExists() code WC 9.4.2

public function offsetExists( $offset ) {
	if ( in_array( $offset, array( 'discount_amount', 'discount_amount_tax' ), true ) ) {
		return true;
	}
	return parent::offsetExists( $offset );
}