Create Users Who Only Access WooCommerce Analytics Coupons Menu

One PublishPress user asked how to create a custom user role that only has access to the “Coupons” area in the WooCommerce Analytics area.

They did not want the user to have access to the WooCommerce report menu. This user was a marketing person and only needed to check on the success of their marketing campaigns that use coupons.

PublishPress Capabilities Pro is a plugin that gives you control over who can access which admin menu links. In this scenario, a little extra work is needed since the “Coupons” menu is connected to the WooCommerce “Reports” menu.

However, thanks to PublishPress Capabilities Pro, we were able to answer the customer's question. Here are the steps to do that:

  • Log into your WordPress admin, then go to Capabilities > Role.
  • Copy the “Subscriber” role and give it a name. In this case, I named it “Coupon Manager”.
WooCommerce coupon manager
  • Navigate to the “WooCommerce” tab and check the box to disable WooCommerce admin restrictions.
WooCommerce admin access
  • Go to “Capabilities”.
  • Select the new role that we have created.
  • Choose the “WooCommerce” tab.
  • Find the “view woocommerce reports” capabilities and check this box.
  • Click “Save Changes”.
View WooCommerce reports capability
  • Go to “Admin Menus”.
  • Disable all the menu links except “Analytics” and “Coupons”.
Admin Menus screen in PublishPress Capabiliites
  • Create a user in the “Coupon Manager” role.
  • You can use the “User Testing” feature in PublishPress Capabilities to test this account.
  • When you try to log into that user, your screen will look like the image below.
Coupon Manager in WooCommerce
  • In the image above you can see the “Sales reports” menu, but we need to hide it.
  • We can hide it using the “Admin Features” option.
  • Insert this ID “#toplevel_page_wc-reports”, as in the image below.
Controlling access to WooCommerce coupons
  • That should complete the process. When you try to log in as a user in the Coupon Manager role, you will see something like this screenshot below.
WooCommerce coupons screen

WooCommerce and PublishPress Summary

WooCommerce and the PublishPress plugins are a powerful combination. You can configure the permissions on your eCommerce store to meet your exact needs.

Other examples include controlling who can manage WooCommerce coupons, creating users who can only manage WooCommerce orders, adding users who can only manage reports, and having users who can only edit products.

You'll also find guides to allowing some users to accept payments on orders on behalf of your customers and understanding the WooCommerce database.

PublishPress Capabilities icon
  • T4su9ehsm U03srcbbfuz Bebadeadceb4 512

    Riza Maulana Ardiyanto, based in Kudus, Indonesia, is a dedicated support specialist at PublishPress. Outside of work, he’s an enthusiastic mobile gamer, always eager to explore new gaming experiences and challenges.

Leave a Reply

Your email address will not be published. Required fields are marked *