Am still somewhat confused which, partly, is a matter of terminology. If we are talkimng about a users WordPress 'role' being changed then surely the plugin should be calling the 'set_user_role' action hook... (https://codex.wordpress.org/Pl....._user_role).
Or am I still misunderstanding?
Thanks for the codex link.
The way that I understand that they manage roles with memberships is that they add an additional user role to the users default role when a subscription is purchased for a membership. When a subscription expires, the additional user role is removed.
So in the case that I'm testing, user DogsBronze has a default role 'Guest'. When a subscription is added to a Bronze Membership (as specified in MP) for that user, the additional user role 'Bronze Member' is added. When the subscription expires (and the cron job is run) the additional user role 'Bronze Member' is removed. At no time, that I can see, is the default user role changed.
SP picks up the additional user role when a subscription is added to that user, but not when it is removed.
The codex link you sent looks like it should be triggered when default role is changed, But I'll get it checked over at MP.
Does it get removed when the membership plugin cron task is run?
We will need to check we are doing things properly but we have had SP users who make good use of the WP role system before without, as far as I know, any issues arising. Seems like the above question should answer that.
'I was specifically meaning - after the nightly cron job is run that removed a row from a user - does this correct the user group assignment within SP. If it does - then we are doing what we can our end to respond to the change.'
Unfortunately not, and this is the problem that I've been describing.
A MP subscription expires and after the cron job, their additional user role is removed from the user record. However, SP continues to grant access to the forum that the subscription authorised. The user is still listed within the SP Forum>User Groups
I don't know if MP is not triggering an action or if SP is not picking it up.