edd_get_discount_by( string $field = '', mixed $value = '' )
Retrieve discount by a given field
Description Description
Parameters Parameters
- $field
-
(Optional) The field to retrieve the discount with.
Default value: ''
- $value
-
(Optional) The value for $field.
Default value: ''
Return Return
(mixed) object|bool EDD_Discount object or false if not found.
Source Source
File: includes/discount-functions.php
Changelog Changelog
Version | Description |
---|---|
2.7 | Updated to use EDD_Discount object |
2.0 | Introduced. |