Change WordPress user roles and capabilities Forums How to or FAQ YITH WooCommerce Gift Card Plugin

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #6833
    edering
    Participant

    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?

    #6834
    Vladimir
    Keymaster

    Did 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.

    #6837
    edering
    Participant

    I 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.

    #6838
    Vladimir
    Keymaster

    Can I look at your site with admin privileges? If Yes, send URL, user/password to support [at-sign] role-editor.com

    #6839
    edering
    Participant

    Hi. I just sent you an admin password for doublec.us Thanks.

    #6841
    Vladimir
    Keymaster

    Hi 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 the yith-plugin-fw-panel-skip-redirect and tab URL parameters for `edit.php’ as allowed for ‘edit.php’ link:
    Allow parameters for YITH Gift Card menu item

    #6845
    edering
    Participant

    Thanks! “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)?

    #6846
    Vladimir
    Keymaster

    No, 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.

    #6847
    edering
    Participant

    thanks

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.