It is similar here:
function gm_on_delete( $user_id ) {
foreach ( gm_get_user_subscriptions( $user_id ) as $list_id => $list ) {
// Unsubscribe User to List.
gm_unsubscribe_user_list( $list_id, $user_id );
}
}
I think it should be:
gm_unsubscribe_user_list( $list, $user_id );
That is because gm_get_user_subscriptions returns numerically indexed array with list IDs.
If I am right, please, fix this. If I am not, can you tell me how to fix this ??