edd_is_discount_valid( string $code = '', string $user = '', bool $set_error = true )

Check whether a discount code is valid (when purchasing).


Description Description


Parameters Parameters

$code

(Optional) Discount Code.

Default value: ''

$user

(Optional) User info.

Default value: ''

$set_error

(Optional) Whether an error message be set in session.

Default value: true


Top ↑

Return Return

(bool) Whether the discount code is valid.


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.