Change WordPress user roles and capabilities › Forums › How to or FAQ › Duplicate Post capabilities
- This topic has 11 replies, 2 voices, and was last updated 1 month ago by
edering.
-
AuthorPosts
-
03/06/2017 at 01:35 #3803
edering
ParticipantHi. I created a Role called Manager. It does not give access to Pages or Posts, but I want the capability for Duplicate WooCommerce Products for this Role. We use this Plugin which does it for all Pages, and Posts including WooCommerce Products. https://wordpress.org/plugins/duplicate-post/ But I do not see any capability to select for Duplicate (or Copy or Clone). How do I do this?
03/06/2017 at 02:10 #3804Vladimir
KeymasterHi,
Look for ‘copy_posts’ or ‘copy_products’ capability. If it does not exist yet, add it manually. I answer without testing.
03/06/2017 at 11:10 #3806Vladimir
KeymasterAs test showed, ‘copy_posts’ capability is enough to product duplication too.
03/06/2017 at 12:13 #3807edering
ParticipantI had that already checked – https://www.screencast.com/t/grRDYmG7PEJl for that role. But when I login as a User for that Role, Clonedoes not appear for Products (it does as an Admin). See this which shows me hovering over a WooCommerce Product and not seeing Clone – https://www.screencast.com/t/SkmYZ484ME
but when I do it for a Page, Clone is there. https://www.screencast.com/t/ygUcBgCZjk
03/06/2017 at 13:32 #3808Vladimir
KeymasterIt’s strange, that I have another result.
Compare my test role with yours.
03/06/2017 at 20:27 #3809edering
ParticipantI checked and all capabilities you have, I have (plus more). https://www.screencast.com/t/2JQdUl0R Any other ideas?
04/06/2017 at 00:57 #3811Vladimir
KeymasterIt seems a problem is not related to the capabilities granted to a user.
1) Try to switch temporally to the default 2017 theme;
2) Try to deactivate all plugins except WooCommerce and Duplicate Posts;
3) If 2 items above will not show a source of a problem, try to reproduce it on a test data copy or if its not critical, use live data. Provide me a copy of your site files and database. I will install them at my local development environment and find a reason using PHP debug session.04/06/2017 at 12:02 #3822edering
ParticipantHi. I figured it out, but don’t have a solution. Duplicate Post has a Permissions area based on Roles – https://www.screencast.com/t/o4JWEBro – but my custom URE Roles are not appearing, so I cannot select it. I sent Duplicate Post a question on how to add Roles to their Permission list, no word yet.
04/06/2017 at 13:57 #3823Vladimir
Keymaster“Duplicate Posts” includes roles to the roles list at its “Permissions” page checking this condition:
// role should have at least edit_posts capability if ( !$role->has_cap('edit_posts') ) continue;
So if you wish to see your role there, then add ‘edit_posts’ capability to it. When you turn ON checkbox for a role here, “Duplicate Posts” just adds ‘copy_posts’ capability to it. And DP plugin shows checkbox for a role turned ON if that role has ‘copy_posts’ capability already. That’s it.
With my test example, I do not see my custom ‘Vendor’ role at DP permissions page roles list, but I have access to the duplicate post actions…
I suppose that you have some other condition, which prevents to use DP plugin for your custom role.
04/06/2017 at 14:54 #3824edering
ParticipantAh, thanks. I was trying to keep that off so the client would not have access to some Custom Post Types, but this is fine.
05/08/2025 at 19:49 #8869edering
ParticipantHi Vladimir. I am having the above issue (similar) again on a new site. A new Role has all capabilities for Posts and Products (like copy_) set. And in Duplicate Post, the Permissions tab shows my new Role (Drucker Admin) selected. Products are not showing the Clone/Duplicate link on the main Products page, and the “Copy to new draft” link on the individual products is not showing. But all custom post types do have it. On the Permissions tab for Duplicate Posts, the section called “Enable for these post types” does not show Products or Woocommerce. I did set Product Variations, but that did not help. https://app.screencast.com/GFVGrY4NTnPUB Any idea how to fix this?
05/08/2025 at 20:10 #8870edering
ParticipantI solved it, sort of. I turned on all remaining Woocommerce capabilities and now cloning works. I’m not sure what capabilities mattered that Products were not covered, but it worked.
-
AuthorPosts
- You must be logged in to reply to this topic.