You've already forked wc-licensed-product
Add error output for debugging statistics page
This commit is contained in:
@@ -301,10 +301,14 @@ class AnalyticsController
|
|||||||
*/
|
*/
|
||||||
public function renderStatisticsPage(): void
|
public function renderStatisticsPage(): void
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
$stats = $this->licenseManager->getStatistics();
|
$stats = $this->licenseManager->getStatistics();
|
||||||
|
|
||||||
// Use PHP rendering directly for stability
|
|
||||||
$this->renderStatisticsPageFallback($stats);
|
$this->renderStatisticsPageFallback($stats);
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
echo '<div class="wrap"><h1>License Statistics - Error</h1>';
|
||||||
|
echo '<div class="notice notice-error"><p><strong>Error:</strong> ' . esc_html($e->getMessage()) . '</p>';
|
||||||
|
echo '<p><strong>File:</strong> ' . esc_html($e->getFile()) . ':' . esc_html($e->getLine()) . '</p></div></div>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user