edd_is_discount_active( int $code_id = null, bool $update = true, bool $set_error = true )
Checks whether a discount code is active.
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
- $set_error
-
(Optional) Whether an error message should be set in session.
Default value: true
Return Return
(bool) Whether or not the discount is active.
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. |