christianwach / civicrm-wp-member-sync

CiviCRM WordPress Member Sync plugin keeps a WordPress user in sync with a CiviCRM membership by granting either a role or capabilities to a WordPress user who has that membership.
https://wordpress.org/plugins/civicrm-wp-member-sync/
GNU General Public License v2.0
17 stars 10 forks source link

Ability to add additional Membership Type transitions after intial setup #53

Closed shaneonabike closed 7 months ago

shaneonabike commented 7 months ago

Thanks for this great extension it really helps in settings roles in Wordpress.

So I have a client who has the following

Present system

Using a role based integration you can choose the transition of Membership(s) for Current and Expired.

We have :

What they want

Is the ability to add another set like the following:

I'm thinking you didn't want to do that b/c it could create a bit of chaos in processing. I think the Drupal equivalent kinda lets you do that and it's based on the order of things.

In their case, they want to provide specific permissions and display/hide certain things if you are in Grace mode.

kcristiano commented 7 months ago

@shaneonabike I use https://develop.tadpole.cc/plugins/civicrm-member-sync-single-role in the above use case. IIRC if there is only one current membership it uses the current membership not the expired. if there are multiple current memberships, the "winner' is the latest expiry date.

It's an add-on plugin as it does not fit all use cases. this work was funded by a client that needed exactly this, but I've ended up making use of it on a decent number of sites.

If this works, great, but we don't plan any changes or additions to this plugin right now.

christianwach commented 7 months ago

I'm thinking you didn't want to do that

@shaneonabike No, I didn't do that because it didn't occur to me and I haven't had such a request in the 10 years that this plugin has been published!

I hope your client's unusual needs are met by the plugin that @kcristiano commissioned me to write.

shaneonabike commented 7 months ago

@christianwach You took my sentence a bit out of context without the entire sentence ;). I was just trying to determine if it would be problematic to set it up that way -- we had issues before with Drupal.

I'll give @kcristiano's suggestion a spin and see if that does the job, which I think it probably will. Thanks so much for your fast responses it's greatly appreciated.

shaneonabike commented 7 months ago

Hi there,

So I tried this extension and it works great, but actually my scenario is a bit different. Essentially, I want to be able to assign a different role based on the actual status of the member.

Is that possible via a hook or some other method?

kcristiano commented 7 months ago

@shaneonabike I'd think the best way would be to create your own plugin that is modeled after the one I referenced, but set the criteria to what you need.

christianwach commented 7 months ago

@shaneonabike I second Kevin's assessment.

shaneonabike commented 7 months ago

Great thanks so much for your suggestions have a great weekend. I'll close this now.