WC_Legacy_Coupon::__isset()publicWC 1.0

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

Метод класса: WC_Legacy_Coupon{}

Хуков нет.

Возвращает

true|false.

Использование

$WC_Legacy_Coupon = new WC_Legacy_Coupon();
$WC_Legacy_Coupon->__isset( $key );
$key(строка) (обязательный)
-

Код WC_Legacy_Coupon::__isset() WC 8.7.0

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;
}