Support » Plugin: Email Users » Question about filtering

  • Resolved zehriya

    (@zehriya)



    So I am starting a project with a client. They will have a site where people register and sign up for different camps/teams and so on.

    I will be adding in a way for them to add categories to the user profile so that they can be filtered and grouped by those categories. Using a plugin like this:
    https://usersinsights.com/wordpress-user-groups/
    or
    https://wordpress.org/plugins/user-groups/

    I noticed that there is mention of being able to add filtering by group. However it looks like the groups have to be manually added in to the function file. Is there anyway I can connect the two plugins so that is allows filtering based on the categories added to the user groups plugins linked to above?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Mike Walsh

    (@mpwalsh8)

    There is integration already done for several User Groups plugins. When you install Email Users, if you go to the settings page (Dashboard > Settings > Email Users) there is a section toward the bottom of the page where it displays the status of the groups plugins which have integration.

    If any of those plugins are already installed, Email users should recognize them and use their group names in the “Send to Groups” or “Notify Groups” functions.

    Plugin Author Mike Walsh

    (@mpwalsh8)

    One more thing – if you are going to use a different user group plugin than the ones which already have an integration done, you can likely use the Meta Filter capability to hook into the groups functionality for whatever plugin you choose.

    zehriya

    (@zehriya)

    That is great to know. I think the user group plugins you offer will be sufficient enough for what I need.

    However, if I was to utilize the meta filter capability. Is that what you have laid out on your info page here: https://wordpress.org/plugins/email-users/

    Just so I follow, your saying in theory I should be able to use this filter function to filter users by the user group meta information that is added to the users profile through the alternative user group plugin.

    That’s cool, but I don’t think the admins using it would want to add the code to the functions file every time they add a new group. They probably wouldn’t want to call me to do it every time they need to to that task either.

    Though I am sure it will prove useful at some point.

    I have another question, but will create a different topic for it.

    Thank you

    Plugin Author Mike Walsh

    (@mpwalsh8)

    While it is hard to know for sure how every other plugin implements groups, if done right, it should be a one time thing setting up the meta filter. For the integrations I’ve already done, I have not had to do anything to update them in years. They have no dependency on the groups defined by the other plugin, it gets the data and description form the plugin and presents it as part of Email Users dynamically.

    zehriya

    (@zehriya)

    Is there an example of the code you used to do that? Cause all of that sounds awesome.

    I was looking at your description page under custom filter usage.

    I see example of where you create specific filters (IE everyone with the first name Alex, first name has no D and so on)

    I see the ones where you create custom groups manually ( where you created police department group)

    Is the functionality you are talking about (Dynamically populating the labels/lists from the group plugin) located under the “supports a filter to generate the Meta Group filters based on a Meta Key” description or the “New in v4.5.0 is an action, mailusers_update_custom_meta_filters description.

    I won’t ask you to walk me through it, but if you can point me to the proper documentation I can pick it up myself. I may not need it for this client, but it seems like a useful thing to know.

    zehriya

    (@zehriya)

    Again thank you for being so responsive! It is appreciated.

    Plugin Author Mike Walsh

    (@mpwalsh8)

    Take a look at this post on my web site. It is from when I added the meta filter capability. There is an example plugin you can download which shows how I implemented the functionality. The plugin does nothing more than define the filters but doing this way means there are no modifications to the Email Users plugin.

    Hmm, I guess I will stick to the groups you already have integrated. I looked at the post and to me it still looks like you are manually creating groups with the custom meta filter (manually defining them), instead of them being dynamically populated by a third party groups plugin.

    So maybe I am misunderstanding. Are you saying I can use the custom Meta filter and MODIFY it to hook in to a groups functionality to dynamically show/populate the groups list within the email users filtering abilities. NOT that your example already does that.

    So if I use a user group not already integrated, And I create a tag for fire department, police department and health department. To integrate it that with your plugin, I still need to define each filter manually. Unless I figure out how to modify the function to auto populate all the groups from the group plugin.

    Thanks,

    Plugin Author Mike Walsh

    (@mpwalsh8)

    The example meta filter plugin does use fixed group names but you should be able to write some code which queries the available groups and builds the meta filters based on the results of those queries.

    I don’t mean to trivialize this, it isn’t a simple task but I don’t think it should be too hard either. A lot of it depends on which groups plugin you want to use and how it stores the data. If it stores it as meta data then you should be able to use the example to construct something similar. If the groups data is stored in a separate table (or tables) then all bets are off and you are left to build a new integration. If that is the case, looking at the code for the existing integrations probably makes sense.

    Thank You so much for your time.

    I am good now.

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.