Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore – other roles using admin of eStore
- This topic has 8 replies, 3 voices, and was last updated 6 years, 3 months ago by Scott Munson.
-
AuthorPosts
-
March 4, 2018 at 8:06 am #14736ChalkySpectator
I need the editor role be used by someone to access both eMember and eStore and I need the author role to only access eStore.
I have looked at https://support.tipsandtricks-hq.com/forums/topic/allowing-non-admin-user-profiles-to-see-the-estore-panel-in-wp-admin
I have used
define(“ESTORE_MANAGEMENT_PERMISSION”, “edit_pages”);
to give access to eStore to the editor role and the editor can access eStore.
I also want to give it to the author role so I replaced edit_pages with publish_posts
define(“ESTORE_MANAGEMENT_PERMISSION”, “publish_posts”);
The editor role can still access eStore but the author role can not access eStore.
What am I doing wrong or should I be doing something else?
March 4, 2018 at 8:49 am #77388ChalkySpectatorI am setting this up on two sites. The above post applies to site 1 but when I have tried to set it up on site 2, I cannot find the line
define(“ESTORE_MANAGEMENT_PERMISSION”, “add_users”);
that section seems to be missing from wp_estore1.php
Please help what have I done differently insetting up the two sites?
I have found that site 1 is using eStore version 8.03 and site 2 is using estore version 8.05
Site 1
WP eStore Version: 8.0.3
WP Version: 4.9.4
WPMU: No
MySQL Version: 5.5.5
Site 2
WP eStore Version: 8.0.5
WP Version: 4.9.4
WPMU: No
MySQL Version: 5.6.37
Both are hosted with the same provider.
March 4, 2018 at 1:55 pm #77389wzpModeratorPlease read this, if you are trying to use custom roles:
https://support.tipsandtricks-hq.com/forums/topic/give-acces-to-emember-for-adminsitraton
March 4, 2018 at 4:27 pm #77390ChalkySpectatorI had read your reply to a previous question and have reverted to using the standard wordpress roles. I am not using custom roles.
My first post refers to another post and explanation and I want to know if that advice should still work.
My second post refers to the fact that the change to allowing the editor role works with eStore v 8.03 but not with v8.05.
Please answer my questions as I have searched this forum to find all I can from other posts but none of them answer my problems.
March 4, 2018 at 8:09 pm #77391wzpModeratorMy second post refers to the fact that the change to allowing the editor role works with eStore v 8.03 but not with v8.05.
I cannot find the line
define(“ESTORE_MANAGEMENT_PERMISSION”, “add_users”);
that section seems to be missing from wp_estore1.php
Version 8.0.3 used a WP version dependent test. Because we no longer support versions of WP less than version 3.0, that line of code was depreciated.
My first post refers to another post and explanation and I want to know if that advice should still work.
Yes, it should still work; with modifications, taking into account the version 8.0.5 changes.
I need the author role to only access eStore.
I have looked at https://support.tipsandtricks-hq.com/forums/topic/allowing-non-admin-user-profiles-to-see-the-estore-panel-in-wp-admin
- Look at the charts here:
https://codex.wordpress.org/Roles_and_Capabilities#manage_options
- Pick a “Capability” that is only particular to an “Author.”
You will notice, that there is no capability that is exclusive to an Author. That means, eStore Admin access will also be given to anyone with the Super Admin, Administrator, or Editor role.
- In the wp_estore1.php file, find the line:
define("ESTORE_MANAGEMENT_PERMISSION", "manage_options");
- Replace manage_options with whatever capability you’ve decided to use.
You should also consider updating both sites to the same 8.0.5 version.
March 5, 2018 at 9:05 am #77392ChalkySpectatorthank you. it’s working now.
August 25, 2018 at 1:59 pm #77393Scott MunsonMemberHelp please…
I still don’t get it.
I’ve found
define(“ESTORE_MANAGEMENT_PERMISSION”, “manage_options”);
what do I replace “manage_options” with if I want an editor to have access to wp estore?
Thank you!
August 25, 2018 at 8:01 pm #77394wzpModerator“edit_pages” works.
August 25, 2018 at 9:10 pm #77395Scott MunsonMemberyes – thanks, finally figured that’s what you were saying (didn’t get an email of your reply for some reason).
Now I’ll just have to remember to make this change every time the plugin is updated….
Maybe they can make the option part of the plugin at some point?
Thank you!!!
- Look at the charts here:
-
AuthorPosts
- You must be logged in to reply to this topic.