Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: 3.1.5
-
Fix Version/s: 4.1.0
-
Component/s: CiviCRM API
-
Labels:None
Description
This code doesn't work. Test memberships are still returned.
require_once('api/v2/Membership.php');
$params = array(
'contact_id' => $contactID,
'is_test' => 0, //using 'member_is_test' doesn't work either
);
$allMemberships = civicrm_membership_contact_get($params);
I'd suggest that the default behavior of the function should be to exclude test membership; this would be consistent with the UI behavior. i.e., a developer would have to explicity supply a param if test memberships are desired.