edd_store_discount( array $details, int $discount_id = null )
Stores a discount code. If the code already exists, it updates it, otherwise it creates a new one.
Description Description
Parameters Parameters
- $details
-
(Required) Discount args.
- $discount_id
-
(Optional) Discount ID.
Default value: null
Return Return
(mixed) bool|int The discount ID of the discount code, or false on failure.
Source Source
File: includes/discount-functions.php
Changelog Changelog
Version | Description |
---|---|
2.7 | Updated to use EDD_Discount object. |
1.0 | Introduced. |