edd_is_discount_expired( int $code_id = null, bool $update = true )
Checks whether a discount code is expired.
Description Description
Parameters Parameters
- $code_id
-
(Optional) Discount ID.
Default value: null
- $update
-
(Optional) Update the discount to expired if an one is found but has an active status.
Default value: true
Return Return
(bool) Whether on not the discount has expired.
Source Source
File: includes/discount-functions.php
Changelog Changelog
Version | Description |
---|---|
2.7 | Updated to use EDD_Discount object. |
2.6.11 | Added $update parameter. |
1.0 | Introduced. |