WC_Legacy_Coupon::__isset
Magic __isset method for backwards compatibility. Legacy properties which could be accessed directly in the past.
Method of the class: WC_Legacy_Coupon{}
No Hooks.
Returns
true|false.
Usage
$WC_Legacy_Coupon = new WC_Legacy_Coupon(); $WC_Legacy_Coupon->__isset( $key );
- $key(string) (required)
- .
WC_Legacy_Coupon::__isset() WC Legacy Coupon:: isset code WC 10.3.6
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;
}