Commit cce50bf8 authored by Kurund Jalmi's avatar Kurund Jalmi
Browse files

Merge pull request #75 from generalredneck/membership_priceset

[#74] Tracking discount codes used on memberships with pricesets.
parents 82945d27 dc61a7f4
......@@ -576,8 +576,12 @@ function cividiscount_civicrm_postProcess($class, &$form) {
$membership_type = $params['selectMembership'];
$membershipId = $params['membershipID'];
if (!is_array($membership_type)) {
$membership_type = array($membership_type);
}
$discount_membership_matches = array_intersect($membership_type, $discount['memberships']);
// check to make sure the discount actually applied to this membership.
if (!CRM_Utils_Array::value($membership_type, $discount['memberships']) || !$membershipId) {
if ( empty($discount_membership_matches) || !$membershipId) {
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment