Users Permissions

8.08K viewsCorepermission user
0

I have a user structure under the name “Customer” integrated with WooCommerce.

But only users “AnPress Participants” can ask and respoder the plugin. It is possible to change this?

0

Allright, I found a way to make it work but I’m pretty sure it’s a  little hack around the whole thing! but just wanted to let you know how I did it for future reference;

Change this line:

 

$roles = array(editor, contributor, author, ap_participant, ap_moderator, subscriber);

and add any role you want (in your and my case, customer)
to the class-roles-cap.php

it’ll look like this:

$roles = array(editor, contributor, author, ap_participant, ap_moderator, subscriber‘, ‘customer’);

when you did that, click save

then deactivate the plugin, and activate it again.
apparently the roles get called on activation so that fixes it!

the only problem is that you have to do this manually after every update I’m afraid. Hope this helps for you as well!

Cheers,

Robin

Robin, thanks for the solution. I have a fix for this too, I will allow basic capabilities of AnsPress to every role. So we dont need to update every role and it will ensure 3rd party compatibility.

Ah okay, is that already out or will it be in the next release? and no problem! this woks temporary at least! thanks for your help!

Currently working or notification system, and after that will add fix for user roles. 🙂

Hi, I changed file class-roles-cap.php, but did not work for me. 🙁

Please give me some days to work on this.

hmm that’s weird!it worked for me! if you need help feel free to shoot me an email at [email protected] I’ll see if I can help you some how!

You are viewing 1 out of 2 answers, click here to view all answers.