Change WordPress user roles and capabilities › Forums › How to or FAQ › YITH WooCommerce Gift Card Plugin
- This topic has 8 replies, 2 voices, and was last updated 4 years, 6 months ago by edering.
-
AuthorPosts
-
13/05/2020 at 20:40 #6833ederingParticipant
I have YITH’s WooCommerce Gift Cards plugin installed. I have a role created (called Orders) that is for the Gift Card manager. When testing, the Users with this role see “YITH” and then “Gift Cards”, but when I click, it just loads the WordPress Dashboard. In the Role, I have all 4 choices set for “All Gift Cards” under the Custom Post Types. https://www.screencast.com/t/L5oYiHg3iwkI I also tried turning on Mange WooCommerce under WooCommerce > Core but that did not help. Any ideas?
14/05/2020 at 02:12 #6834VladimirKeymasterDid you block some menu items for this role using “Admin menu”? If Yes and use ‘not selected’ blocking model, try to switch to ‘selected’ as a workaround or read carefully last part of the documentation article “Technical details” in relation to “Block not selected” variant.
14/05/2020 at 10:39 #6837ederingParticipantI am using Admin Menu but using Block Selected. https://www.screencast.com/t/AzDL732iZNnL When logged in as this Role, I do see the YITH menu, and the Gift Cards choice. It just redirects me to main Dashboard. Also, I do have manage_options enabled.
14/05/2020 at 10:49 #6838VladimirKeymasterCan I look at your site with admin privileges? If Yes, send URL, user/password to support [at-sign] role-editor.com
14/05/2020 at 11:03 #6839ederingParticipantHi. I just sent you an admin password for doublec.us Thanks.
14/05/2020 at 12:58 #6841VladimirKeymasterHi Erik,
I resolved the issue with this redirection. It’s not obvious though. YITH defines “Gift Cards” menu item as
/wp-admin/admin.php?page=yith_woocommerce_gift_cards_panel
, but redirects it to the really used/wp-admin/edit.php?post_type=gift_card&yith-plugin-fw-panel-skip-redirect=1
So I had to register theyith-plugin-fw-panel-skip-redirect
andtab
URL parameters for `edit.php’ as allowed for ‘edit.php’ link:
14/05/2020 at 13:49 #6845ederingParticipantThanks! “tab” URL paramenters? Does that mean I could control which of these “tabs” the Role can see? https://www.screencast.com/t/FpYogPj5XfH4 Ideally, this Role would only see the Gift Card Dashboard, and the Create Card button. Also, I noticed that the Role of Orders is not letting the Use click on the Post to see the details even though I have all 4 Capabilities on for that Role CPT and also all 12 for the main Posts. How do allow them to view/edit Gift Card Posts, and create New Ones (the Role is working for that right now)?
14/05/2020 at 15:05 #6846VladimirKeymasterNo, you can not manage access to the different tabs inside the page using URE.
It’s just about to allow the URL edit.php with ‘tab’ parameter inside (with any value).To permit role ‘orders’ to edit gift cards add ‘edit_product’ capability (from ‘Products’) group to this role. I can not explain the logic. Debugger just showed that YGC plugin defines it own custom post type this way.
14/05/2020 at 15:54 #6847ederingParticipantthanks
-
AuthorPosts
- You must be logged in to reply to this topic.