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


Top ↑

Return Return

(mixed) bool|int The discount ID of the discount code, or false on failure.


Top ↑

Source Source

File: includes/discount-functions.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
2.7 Updated to use EDD_Discount object.
1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.