Unlock Smart Manager for WooCommerce Shop Manager

In this post we will talk about how to unlock free version of Smart Manager for WooCommerce Shop Manager user.

If you ever used Smart Manager for e-Commerce WordPress plugin with WooCommerce e-shop, you may asked the question:
– Why WooCommerce super-user with ShopManager role does not see “Smart Manager” menu item under the “Products” menu?

For some reasons the free version of “Smart Manager” is available for the user with “Administrator” role only. But Pro version of “Smart Manager” has the user interface to configure what other WordPress roles are allowed to work with “Smart Manager”. So if you wish to use the full functionality of the “Smart Manager” consider to buy Pro version.
What to do if you wish to stay with free version of “Smart Manager”, but need make it available to the users without “Administrator” role? Is it possible to make free version of “Smart Manager” available for other user roles without changing its source code? Read more Unlock Smart Manager for WooCommerce Shop Manager

Do not use numeric role names

I do not recommend you to use numeric role names, e.g. ‘1000’, ‘150’, etc. You may create such role, may fill it with capabilities with the help of current and previous versions of “User Role Editor” and may be other plugins. But WordPress will not allow you to use such roles. You will get error message, like this: “You can’t give users that role”. Read more Do not use numeric role names

Shortcode for content view access restriction

Shortcode for posts/pages content view access restriction is available at User Role Editor Pro starting from version 4.7. Enclose restricted content with these shortcodes:
1) [user_role_editor roles="role1, role2"] some restricted content [/user_role_editor];
2) [user_role_editor except_roles="role1, role2"] some restricted content [/user_role_editor];
3) [user_role_editor users="user_id1, user_login1"] some restricted content [/user_role_editor];
4) [user_role_editor except_users="user_id1, user_login1"] some restricted content [/user_role_editor]
and you will restrict access to the part or the whole content of any post or page.

roles attribute: restricted content will be available for the logged-in user with one of the roles you input for the roles attribute of the [user_role_editor] enclosing tag. You should input the role identificator, not the role name. For example, valid shortcode will be [user_role_editor roles="contributor"], not [user_role_editor roles="Contributor"]. Pay attention to the lowercase 1st letter at “contributor”.
For all other users including the guest visitors restricted content, enclosed by the shortcode described above, will be hidden.
If you wish to show some content for not logged in (guest) visitors only, use this shortcode [user_role_editor roles="none"].

If you use a comma ‘,’ sign as a separator inside roles list: “role1, role2”, then ‘OR’ rule is applied: users with role1 OR role2.

If you use a ‘&&’ signs as a separator inside roles list: “role1 && role2”, then ‘AND’ rule is applied: user with role1 AND role2 simultaneously.

except_roles attribute: To show content inside shortcode to all logged in users except users with selected roles, included them into the ‘except_roles’ attribute. For example, if you don’t wish to show some text to the ‘subscriber’ role and other not logged in visitors use this shortcode:
[user_role_editor except_roles="subscriber, none"]some text to hide from subscribers[/user_role_editor].
‘none’ is a virtual role ID used by URE for not logged-in users

users attribute: To show content inside shortcode to logged in users with user ID or login inside comma separated list you can use this shortcode:
[user_role_editor users="18, 23, willy"]some restricted content[/user_role_editor]

except_users attribute: To show content inside shortcode to all users except users with user ID or login inside comma separated list you can use this shortcode:
[user_role_editor except_users="17, 25, peggy"]some restricted content[/user_role_editor]

In order to take into account not logged-in visitor you can use ID=0, like:
[user_role_editor except_users="0, 23, willy"]some restricted content[/user_role_editor]. This shortcode will show content inside to all logged-in users except user with ID=23 and user with login ‘willy’.

Other shortcodes enclosed inside User Role Editor shortcode are processed recursively.

How to restore deleted WordPress user roles

This post will explain how to restore deleted WordPress user roles or capabilities. Some users wrote that they press the “Reset” button at the “Settings->User Role Editor->Tools” tab expecting something different that it really does. As the result they lost any new added roles and capabilities. It doesn’t matter manually they were added or automatically by plugins or themes. After you press “Reset” button “User Role Editor” deletes all user roles and calls WordPress core function which is used during 1st WordPress installation. Roles and capabilities are created by WordPress from the scratch and you get standard (core) list of user roles and capabilities only as the result. Read more How to restore deleted WordPress user roles

Allow user to edit selected posts and pages only

You can allow user to edit the selected set of posts or pages or custom post types only. When it could be useful? Suppose you need to give the user ability to edit someone other’s post. But if you simply give that user “edit_others_posts” capability, such user will can edit any posts created by other authors. In this situation “User Role Editor Pro” may help you. Just restrict user access for editing selected posts and pages only. Read more Allow user to edit selected posts and pages only