do_action( 'edd_post_insert_discount', array $meta , int $ID )
Fires after the discount code is inserted.
Description Description
Parameters Parameters
- $meta
-
The discount details.
- 'code'
(string) The discount code. - 'name'
(string) The name of the discount. - 'status'
(string) The discount status. Defaults to active. - 'uses'
(int) The current number of uses. - 'max_uses'
(int) The max number of uses. - 'start'
(string) The start date. - 'min_price'
(int) The minimum price required to use the discount code. - 'product_reqs'
(array) The product IDs required to use the discount code. - 'product_condition'
(string) The conditions in which a product(s) must meet to use the discount code. - 'excluded_products'
(array) Product IDs excluded from this discount code. - 'is_not_global'
(bool) If the discount code is not globally applied to all products. Defaults to false. - 'is_single_use'
(bool) If the code cannot be used more than once per customer. Defaults to false.
- 'code'
- $ID
-
The ID of the discount that was inserted.
Source Source
File: includes/class-edd-discount.php