{"id":196354,"date":"2014-02-09T15:45:12","date_gmt":"2014-02-09T15:45:12","guid":{"rendered":"https:\/\/toolset.com\/?post_type=course-lesson&#038;p=196354"},"modified":"2020-11-16T10:08:34","modified_gmt":"2020-11-16T10:08:34","slug":"custom-woocommerce-roles-admin-capabilities","status":"publish","type":"course-lesson","link":"https:\/\/toolset.com\/es\/course-lesson\/custom-woocommerce-roles-admin-capabilities\/","title":{"rendered":"Custom WooCommerce Roles and Admin Capabilities"},"content":{"rendered":"\n<p>Here are some of the things that you can achieve with custom roles and capabilities:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Allow an accountant to manage orders, issue refunds and produce reports, without being able to accidentally edit content in your site.<\/li><li>Allow your service representatives to view and update orders, but not access your reporting and finances.<\/li><li>Allows your content authors to edit product information, but not access sales data.<\/li><\/ul>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><a href=\"https:\/\/toolset.com\/home\/types-access\/\">Access<\/a>&nbsp;plugin lets you do all this and more, without writing a single line of code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating custom roles<\/h2>\n\n\n\n<p>Remember that your WooCommerce store is only a part of the site. When you create new roles, you need to consider everything that they need to do on the site, including any e-commerce related tasks. Use the following steps to create your own roles with custom permissions for WooCommerce.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Create a custom role.<\/li><li>Click on&nbsp;<strong>Change permissions<\/strong>&nbsp;for that role, click on&nbsp;<strong>Woocommerce capabilities<\/strong>&nbsp;to display related ones and grant the&nbsp;<strong>manage_woocommerce<\/strong>&nbsp;capability. This capability is required if you want the role to have access to any WooCommerce administration screen.<\/li><li>Add more capabilities in this dialog or set permissions for WooCommerce-related post types on the&nbsp;<strong>Post Types<\/strong>&nbsp;tab.<\/li><li>Change the role of the desired user to the new custom role you have just created.<\/li><\/ol>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"a0cdebd572c5e87c71d15457e4de987f\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2014\/02\/woocommerce-custom-roles-1.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2014\/02\/woocommerce-custom-roles-1-500x479.png\" alt=\"Roles that you will see after installing WooCommerce\" class=\"wp-image-1684905\"\/><\/a><div class=\"tb-image-caption\"><figcaption>Roles that you will see after installing WooCommerce<\/figcaption><\/div><\/figure>\n<\/div>\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>When you create the new role, if you want the user to have no inherent capabilities (allowing you to add specific capabilities with Access), do not select any role to copy privileges from. This will give no permissions to the role and you will be able to add all capabilities manually. In case you want to give users the same capabilities as authors (being able to write and edit their own content), select to copy privileges from&nbsp;<strong>Author<\/strong>&nbsp;role. To create users who can edit any content, select to copy privileges from&nbsp;<strong>Editor<\/strong>&nbsp;role. This setting will adjust the capabilities for content editing, so you can just set the WooCommerce capabilities manually.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"b86d60a848cacfd156730a9264ab0982\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2014\/02\/woocommerce-custom-roles-2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2014\/02\/woocommerce-custom-roles-2-500x215.png\" alt=\"Editing WooCommerce capabilities using Access plugin\" class=\"wp-image-1684917\"\/><\/a><div class=\"tb-image-caption\"><figcaption>Editing WooCommerce capabilities using Access plugin<\/figcaption><\/div><\/figure>\n<\/div>\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"tb-fields-and-text\" data-toolset-blocks-fields-and-text=\"3e1d2592ce20bdf2bf813c9dfa44c991\"><p><span>For step-by-step information, read the complete documentation on <a href=\"https:\/\/toolset.com\/es\/course-lesson\/setting-up-custom-roles-for-members\/\">setting WordPress admin capabilities<\/a><\/span><span> and <a href=\"https:\/\/toolset.com\/es\/course-lesson\/setting-access-control\/\">access to WordPress content<\/a>.<\/span><\/p><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Recommended settings&nbsp;for WooCommerce roles<\/h2>\n\n\n\n<p>Access to orders, coupons or products is set by the corresponding post type table and access to reports is set with&nbsp;a WooCommerce capability.&nbsp;<strong>In any case, a&nbsp;role must have&nbsp;<\/strong><strong>manage_woocommerce capability, in order to be able to access WooCommerce administration pages<\/strong>. You can use the following table as a starting point for useful roles in advanced WooCommerce sites. Of course, this is only our suggestion. You should enable the specific capabilities that you need for different roles in your own sites.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid tb-grid\" data-toolset-blocks-grid=\"7a125aeb5921beeefda5528d1313862c\">\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"3034fbe886c11054e95b46b09d3e4112\">\n<p><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"3034fbe886c11054e95b46b09d3e4112\">\n<p><strong>Accountant<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"3034fbe886c11054e95b46b09d3e4112\">\n<p><strong>Service representative<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"3034fbe886c11054e95b46b09d3e4112\">\n<p><strong>Content author<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"e38ed0dc19fa46915d3b935d221dfd5e\">\n<p>Purpose <sup>1<\/sup><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"b7f73673cf44e8928228d0688519db14\">\n<p>An accountant should be able to produce reports and view individual orders. No edit privileges are granted for products, coupons or promotions.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"280be1eaa4bb3b48c1c474a95e0533b3\">\n<p>A service representative can see individual orders, but doesn\u2019t have access to reports. No access to product editing.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"43532b43698bbe048b957f27b765d833\">\n<p>A content author can edit products, as well as standard WordPress content. No access to sales information. A user level of 7 grants editing capabilities to WordPress content, without administration privileges.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"a1df5aff02ad01323b9e797bb673f84f\">\n<p>Add copy privileges from &nbsp;<sup>2<\/sup><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"b455f984d25247fb4c87672135c31c21\">\n<p>0<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"688edd6c1d9b15d4929b05c9ff04eec8\">\n<p>0<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"c3eb1d1ec6485ba563815b1cab509a25\">\n<p>7<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"b3a9bb038fd426a680aafccfecf76cfd\">\n<p><em>manage_woocommerce<\/em> capability<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"d25753dd84e7106bb1349b2b63654145\">\n<p><strong>YES<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"2b7ac0956cfa521949e226e92124eced\">\n<p><strong>YES<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"09b360b9f780a8c5f01dbb8f3bb6a18f\">\n<p><strong>YES<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"f14d1c2a409dea8c92072279b4a29a59\">\n<p><em>view_woocommerce_reports<\/em> capability<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"8515a8756ca29a15b4dbe954d69c07f6\">\n<p><strong>YES<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"b552c6ae7eb2c642e2173e02bb9c5396\">\n<p>NO<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"c3bdcd38618cbff762547b667ba164db\">\n<p>NO<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"1d2693eb66cc959ca56d12d23bc161b2\">\n<p><em>Orders<\/em>&nbsp;post type table settings<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"00154b9aa464a51a4ba58bc98907be4b\">\n<p><strong>Read, Edit any, Delete any, Publish<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"3eed0533c0c9c49cc9eee4643f342479\">\n<p><strong>Read, Edit any, Delete any, Publish<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"f20f3a2cbf1c9dbfdf008f69a94cef42\">\n<p><strong>Read, Edit any, Delete any, Publish<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"0ce7b8372737aab35639857d3d06d40b\">\n<p><em>Coupons<\/em>&nbsp;post type table settings<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"2699126f94b79012ab1658b77fea0c49\">\n<p>None<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"e81e4a265304aec0e502f4c51b7c7884\">\n<p>None<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"f0fd50cf42ad2f976506f72024452982\">\n<p><strong>Read, Edit any, Delete any, Publish<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"0abf704ee4a104197b4513dbaef97f58\">\n<p><em>Products<\/em>&nbsp;post type table settings<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"a11bd2bdfbcf5074f380435b655e0b88\">\n<p>None<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"f90bbbb9a0f449e83df9c02f78c48615\">\n<p>None<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"9389b76ef1bf4fa709d145ece6188cf7\">\n<p><strong>Read, Edit any, Delete any, Publish<\/strong><\/p>\n<\/div>\n<\/div>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><sup>1<\/sup>&nbsp;We defined the purpose of these roles based on our experience running an online business. Your needs might be different, so you may need to create different roles with different capabilities.&nbsp;<em>Access<\/em>&nbsp;plugin lets you define any role that you choose and grant the capabilities that you need.&nbsp;<\/p>\n\n\n\n<p><sup>2<\/sup>&nbsp;Copying the privileges from an existing role automatically sets the built-in WordPress capabilities, to match those of the closest built-in role. You can achieve the same capabilities by not copying privileges from any role and manually granting individual capabilities.<\/p>\n","protected":false},"author":4341,"featured_media":1664833,"template":"","related-lesson":[8445],"class_list":["post-196354","course-lesson","type-course-lesson","status-publish","has-post-thumbnail","hentry","related-lesson-e-commerce"],"_links":{"self":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/196354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson"}],"about":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/types\/course-lesson"}],"author":[{"embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/users\/4341"}],"version-history":[{"count":7,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/196354\/revisions"}],"predecessor-version":[{"id":1691457,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/196354\/revisions\/1691457"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/media\/1664833"}],"wp:attachment":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/media?parent=196354"}],"wp:term":[{"taxonomy":"related-lesson","embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/related-lesson?post=196354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}