Filter the results of the discount code check. This can be used to add additional programmatic requirements to a discount code being used. Return true if discount code is okay to use. Return false or a string containing the error text if the discount code is not okay to use.


$pmpro_check_discount_code = apply_filters("pmpro_check_discount_code", bool $okay, object $dbcode, int $level_id, string $code);

Parameters

$okay
bool; True if discount code check is okay. False is there was an error.
$dbcode
Object; containing code data from database row.
$level_id
int; Level the user is checking out for.
$code
string; Discount code string.

Source

View in Source Code

Related Articles for pmpro_check_discount_code