This library provides admin list-page and list-table utilities for custom WooCommerce data types defined with x-wp/wc-data-type. Define a data type once, then get a consistent admin listing experience with minimal boilerplate.
- List page handling: Register admin pages for custom data types with
List_Page_Handler. - WooCommerce-style list tables: Extend
List_Tablefor a familiarWP_List_Tableworkflow tuned for WooCommerce objects. - Shared mixins: Reusable list-table behaviors via
src/Mixins/*. - Legacy compatibility: Wrappers (
XWC_Data_List_Page,XWC_Data_List_Table) keep existing consumers working. - WordPress-native integration: Designed for plugin code already built around WordPress and WooCommerce lifecycles.
You can install this package via Composer:
composer require x-wp/wc-data-type-adminTip
We recommend using automattic/jetpack-autoloader with this package to reduce autoloading conflicts in WordPress environments.
src/List_Page_Handler.php: admin page handler with DI-based table resolutionsrc/List_Table.php: base table implementation shared by legacy and new flowssrc/Mixins/*: shared list-table behaviorssrc/Core/*: legacy compatibility wrapperstemplates/html-admin-page-edsl.php: shared admin page template
Regression checks:
php tests/regressions.phpStatic analysis:
php -d memory_limit=1G vendor/bin/phpstan analyse --debugNote
The regression script is intentionally lightweight and does not require a full WordPress test bootstrap. PHPStan is configured conservatively for this library; in constrained environments, --debug is the verified non-parallel invocation path.
For package-specific usage, start with the public entrypoints:
XWC\Data\Admin\List_Page_HandlerXWC\Data\Admin\List_TableXWC_Data_List_Page(legacy)XWC_Data_List_Table(legacy)
Additional project information is available in the repository.