woocommerce / woocommerce

A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
https://woocommerce.com
9.42k stars 10.77k forks source link

Leaderboard analytics are not visible in the `view_woocommerce_reports` role capability #39366

Open marissaexplores opened 1 year ago

marissaexplores commented 1 year ago

Prerequisites

Describe the bug

The Leaderboards analytics data does not show up with the view _woocommerce_reports role capability.

leaderboard-data-missing png

Expected behavior

The Leaderboard data should be visible when the view_woocommerce_reports capability is enabled.

Actual behavior

When the manage_woocommerce capability is disabled, and the view_woocommerce_reports capability is enabled, the Leaderboard data does not display under Analytics > Overview > Leaderboards.

Steps to reproduce

  1. Use one of these plugins to edit the user roles.
  2. For the Shop Manager role, disable the manage_woocommerce capability and keep the view_woocommerce_reports capability enabled.
  3. Log in as the Shop Manager.
  4. Go to Analytics > Overview
  5. Scroll down to the Leaderboard section - you will see the title, but no data

WordPress Environment

Tested with: WordPress version 6.2.2 WooCommerce version 7.9.0

Isolating the problem

marissaexplores commented 1 year ago

6525273-zen