benji7
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce Analytics] WooCommerce Analytics missingThat’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?
Forum: Plugins
In reply to: [WooCommerce Analytics] WooCommerce Analytics missingYes! 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.)
Forum: Plugins
In reply to: [WooCommerce Analytics] WooCommerce Analytics missing
(
/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.
Forum: Plugins
In reply to: [WooCommerce Analytics] WooCommerce Analytics missingThe 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/vt4inypi