Skip to content

Commit 75215f8

Browse files
Fix fatal error: load WP_List_Table before extending it
WP_List_Table is only available in wp-admin context. Since the plugin loads all class files on every request, the frontend crashed with "Class WP_List_Table not found". Add class_exists check to require the core WP file when needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dab367b commit 75215f8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

includes/class-packrelay-entries-list-table.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
exit;
1111
}
1212

13+
if ( ! class_exists( 'WP_List_Table' ) ) {
14+
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
15+
}
16+
1317
/**
1418
* Class PackRelay_Entries_List_Table
1519
*

0 commit comments

Comments
 (0)