-
Notifications
You must be signed in to change notification settings - Fork 144
Description
My goal is to create a role who has a capability to create learnpress orders.
After adding edit post capability, I can a role with this able to get as far as as being able to create a new order (post).
But, to add an item (course), this fires off search course api, but this is restricted to admin.
I'd like to change this so that it can be available to anyone with this capability,
Also I have added the role to be able to list users.
But from learnpress order, again, on the order page.,the user list is restricted to administer role..
I can see a lot of code in the /admin folder relies on checking if the current user is ADMIN_ROLE anand "administrator".
I'd love to get help with how to change this check to check for a capability instead, eg "lp_manage_order"