Thought it is possible to batch update a few membership statuses via profile, wanted to clear Expiration Dates, however changes only partially stick: while Status saves, Expiration Date stays, which creates a paradoxical Current Memberships with Expiration Dates in the past. Could be possible if "Status Override?" field was available for Profiles I guess.

Profile settings

Have tried SearchKit however ended up with "An error occurred while attempting to update 206 Memberships." message w/o further details in ConfigAndLogs.

Not sure if API way works either ( akin to setting membership status override in bulk update ) , however this is the only way left before entering SQL queries path.

UPD API way requires more code to be written, so the fastest would be plain SQL, like this one:

UPDATE `civicrm_membership` 
SET `end_date` = NULL, `status_id` = '2', `is_override` = '1'   
WHERE `membership_type_id` = SOME-MEMBERSHIP-TYPE-ID 
AND status_id NOT IN(6,7);

where status IDs from your civicrm_membership_status table (6=Cancelled and 7=Deceased in mine)

CiviCRM 5.62, Wordpress.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.