WooCommerce Analytics missing
-
Hi đ
After updating WordPress, WooCommerce, and PHP to version 8.3, the WooCommerce Analytics section disappeared from the WordPress admin menu.
Here are the details:
- WordPress version: 6.8.3
- WooCommerce version: 10.1.2
- PHP version: 8.3
- Theme: my own custom php/twig (timber) theme
- Environment: Apache with nginx proxy | AlmaLinux 8 | MySQL 8.0.43
When I go to WooCommerce â Reports (
/wp-admin/admin.php?page=wc-reports), I see the following notice (translated from Polish):âAs of WooCommerce 4.0, these reports are being replaced. A new, improved Analytics section is now available for users running WordPress 5.3 or higher. Go to WooCommerce Analytics or learn more about the new Analytics documentation.â
However, when I click on âGo to WooCommerce Analyticsâ (link:
/wp-admin/admin.php?page=wc-admin&path=/analytics/overview), the page starts loading with the WooCommerce spinner, then the loader changes to âForbiddenâ, and finally shows:âYou do not have permission to access this page.â
There are no errors or warnings in the debug.log, and the issue persists even after clearing all caches and transients
It seems like WooCommerce Admin (Analytics) fails to initialize correctly or loses capability mapping after the update.
Has anyone experienced the same issue on PHP 8.3 or the latest WooCommerce versions?
Any insights or fixes would be greatly appreciated.Thank you!
â Szymon-
This topic was modified 1 month, 2 weeks ago by
benji7. Reason: bad url
The page I need help with: [log in to see the link]
-
Hi there!
Thanks for sharing the details, and I understand how concerning it can be when the Analytics section disappears after an update.
Please go to WooCommerce â Settings â Advanced â Features and make sure the âEnable WooCommerce Analyticsâ option is checked. This ensures the new Analytics interface is active in your admin area.
If the option is already enabled but youâre still seeing the âForbiddenâ message, please try the following:
- Clear your browser cache and cookies, then log back in.
- Ensure your user role has the
manage_woocommercecapability (this is required to access Analytics).
If the issue persists after these steps, Iâd like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:
- System Status Report which you can find via WooCommerce > Status
- Fatal error logs (if any) under WooCommerce > Status > Logs.
Please use https://pastebin.com/ or https://gist.github.com/ and share a link to that paste in reply here. Once we have more information, weâll be able to assist you further.
The checkbox has been checked already. It’s strange that it’s kinda blocked (the checkbox is gray, “block” cursor on checkbox hover and I can’t change the value).
- â Clear your browser cache and cookies, then log back in.
- â
Ensure your user role has the
manage_woocommercecapability (this is required to access Analytics).
System Status Report:
https://pastebin.com/6sL6NZJjWooCommerce > Status > Logs (no fatals):
https://pastebin.com/vt4inypiHi there!
Thank you for sharing the details.
Iâve checked the system status report and noticed that WooCommerce is not up to date. Please update the plugin to the latest version (10.2.2).
Also, the error log you shared indicates that a feature used by your site (or one of your plugins/themes) is deprecated. The WooCommerce Admin Navigation feature and its related classes â Screen, Menu, and CoreMenu â were deprecated starting from WooCommerce 9.3.
For testing purposes, please perform a conflict test by deactivating all plugins except WooCommerce , Analytical woocommerce and switching to a default theme such as Storefront.
You can find more information on how to run a conflict test here:
đ How to test for conflicts
(
/wp-admin/admin.php?page=wc-admin&path=%2Fanalytics%2Foverview)The screenshot taken after disabling all plugins excluding WooCommerce and WooCommerce Analytics, also theme set to default twentytwentyfive.
Before I updated WooCommerce to 10.2.2 also on my local development copy instance it’s not working – same as on production.
Hi there!
Thank you for sharing the details about the issue.
Since you mentioned that the âEnable WooCommerce Analyticsâ option is grayed out, this indicates that WooCommerce Admin is currently disabled. Could you please confirm if youâre seeing the message âWooCommerce Admin has been disabledâ below that option?
Also, please try adding the following code using the Code Snippets plugin and see if that resolves the issue:
add_filter( 'woocommerce_admin_disabled', '__return_false' );Let us know if that works for you.
Yes! You’re right! Thank you very much! đ
There’s still one more issue to resolve. The WooCommerce Analytics dashboard now loads and opens correctly, but no statistics are being displayed. Each chart shows the error:
“There was an error getting your stats.”
You can see it in the attached screenshot:

(The screenshot was taken with all plugins disabled â except WooCommerce and WooCommerce Analytics â and the active theme switched to twentytwentyfive.)
That’s me again đ
When accessing directly:
https://local.beautysofa24.de/wp-json/wc-analytics/reports/orders/statsit always returns:
{"code":"woocommerce_rest_cannot_view","message":"Entschuldigung, es können keine Ressourcen aufgelistet werden.","data":{"status":401}}This happens even when logged in as administrator (user ID 1).
I verified that the administrator role includes all the required WooCommerce capabilities:
wp eval "print_r( get_role('administrator')->capabilities );"Output includes:
'manage_woocommerce' => true
'view_woocommerce_reports' => true
'view_woocommerce_analytics' => trueBut checking the current user:
wp eval "var_dump( current_user_can('view_woocommerce_reports') );"returns
bool(false)So the role has the capability, but the user context in CLI and REST does not recognize it.
—
wp wc tool list --user=1shows all analytics tools, including
clear_woocommerce_analytics_cache,
so WooCommerce Admin is properly registered.—
wp user meta get 1 wp_capabilitiesreturns: array
('administrator' => true,)â so the user is indeed an administrator.What to do now?
Hi @benji7,
Thanks so much for the detailed follow-up, and great job narrowing this down. You’ve already done a ton of diagnostic work, and thatâs making it much easier to pinpoint the issue.
Now that WooCommerce Analytics is loading correctly, the remaining problem seems to be with the REST API permissions. Specifically, the endpoint:
/wp-json/wc-analytics/reports/orders/statsâŠis returning a
401 Unauthorizederror, even when you’re logged in as an administrator. That suggests a mismatch between the userâs actual capabilities and what WooCommerce expects during REST requests. Here are the next steps to try:- Sometimes custom themes or plugins interfere with capability mapping. Try adding this via Code Snippets:
add_filter( 'woocommerce_analytics_enabled', '__return_true' );add_filter( 'woocommerce_admin_disabled', '__return_false' );- Clear the analytics cache at WooCommerce â Status â Tools, find the Clear Analytics Cache tool and click “Clear” to run it.
- If that doesn’t resolve it, try re-importing historical data. Go to WooCommerce â Analytics â Settings, look for the option to re-import historical data and run the import process. After clearing the cache, give it a few minutes for the system to regenerate the data, then refresh your analytics dashboard.
- Some security or optimization plugins may interfere with REST API headers. Try disabling all plugins temporarily and retest, then re-enable them one by one.
I hope that helps. Let us know if you need anything else.
It seems we haven’t heard back from you for a while, so I’ll go ahead and mark this thread as resolved. Feel free to reach out whenever you’re ready to continue.
If you have time, we’d be grateful for a review: https://wordpress.org/support/plugin/woocommerce-analytics/reviews/
You must be logged in to reply to this topic.