User role based on subscription status?

This topic contains 6 replies, has 3 voices, and was last updated by  Benjamin Schmitz 7 years, 11 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #320966

    Benjamin Schmitz
    Expired Member
    Post count: 59

    Hi guys,

    Would it be possible to auto assign user role based on subscription level?

    For example, regular user would by default be assigned with role “Subscriber”, but if he adds or claim a listing, his role would be auto changed to “Customer”.

    That way it would be easier to control app behaviour for certain user levels.

    I’ve seen in the tutorial that it’s possible to create a custom function for displaying a different single page for “package-2”, so I would assume that we can also query if user have posts and assign a new user role?

    Tips? Answers? Done solutions?
    All are welcome!

    #321437

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    that would require a customization, but what if a user owns more than one listing, each with a different price?

    Let us know,

    Thanks

    #321447

    Benjamin Schmitz
    Expired Member
    Post count: 59

    It doesn’t matter how many listings does he owns, as soon as he makes a purchase, he’s a customer.
    Ideally would be when/if all created listings by that user expires, he gets a status like “Previous customer”.

    Another benefit of this would be creating a targeted mailing lists. Hope it makes sense.

    #321465

    Paolo
    Site Admin
    Post count: 31206

    OK, I asked to the developers to help us figuring out what would be the best way to approach this, however WordPress doesn’t provide a User Role customer.

    Do you have a plan for that?

    I also hope you are aware that this is considered a customization and it goes beyond the scope of the support forum.

    Let us know,

    Thanks

    #321469

    Benjamin Schmitz
    Expired Member
    Post count: 59

    Thanks!

    Yeah, my plan is to create an additional roles. There are quite a few plugins which are capable of controlling the user flow on the site. User Role Editor comes first on my mind.

    I’m aware it’s out of the scope, I was just hoping I’ll get some kind of a hint on this. I’ll figure the rest my self. I’m quite knowledgeable with PHP but WordPress hooks and actions are not quite in my scope.

    Anyways, you can consider something like this for upcoming versions of WPGD

    #321999

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    It would be simple enough to change the user role depending on circumstances, i guess you would use the save/update post hook to check the author of the saved post and adjust the user role accordingly.

    You could do this without a user role, u could write a simple function to check the state of the user, if they have any posts and/or if they have any live/draft posts.

    Stiofan

    #322037

    Benjamin Schmitz
    Expired Member
    Post count: 59

    Yeah, that might just work! I’ll try to figure something out with it. Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount