edd_update_discount_status( int $code_id, string $new_status = 'active' )
Updates a discount’s status from one status to another.
Description Description
Parameters Parameters
- $code_id
-
(Required) Discount ID (default: 0)
- $new_status
-
(Optional) New status (default: active)
Default value: 'active'
Return Return
(bool) Whether the status has been updated or not.
Source Source
File: includes/discount-functions.php
Changelog Changelog
Version | Description |
---|---|
2.7 | Updated to use EDD_Discount object. |
1.0 | Introduced. |