WC_Legacy_Coupon::__isset( string $key )

Magic __isset method for backwards compatibility. Legacy properties which could be accessed directly in the past.


Description Description


Parameters Parameters

$key

(Required)


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/legacy/class-wc-legacy-coupon.php

	public function __isset( $key ) {
		$legacy_keys = array(
			'id',
			'exists',
			'coupon_custom_fields',
			'type',
			'discount_type',
			'amount',
			'coupon_amount',
			'code',
			'individual_use',
			'product_ids',
			'exclude_product_ids',
			'usage_limit',
			'usage_limit_per_user',
			'limit_usage_to_x_items',
			'usage_count',
			'expiry_date',
			'product_categories',
			'exclude_product_categories',
			'minimum_amount',
			'maximum_amount',
			'customer_email',
		);
		if ( in_array( $key, $legacy_keys ) ) {
			return true;
		}
		return false;
	}

Top ↑

User Contributed Notes User Contributed Notes

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