Purpose
This document describes the technical capabilities and operational flow of the PayoutListTable class, which manages the "Payout Requests" screen in the admin panel.
π§Ύ Payout List Table
PayoutListTable is the primary admin-side UI component of Rentiva's financial governance layer. Built on the WP_List_Table class, it presents complex financial data in a readable, actionable format.
ποΈ Core Responsibilitiesβ
- Analytics View: Real-time display of vendor balances and requested payout amounts.
- Secure Filtering: Listing only payout requests in valid states.
- Transaction Management: Bulk approval and CSV export integration.
π Column Structure and Data Sourcesβ
Each column in the table is fed from different layers of the database:
| Column | Data Source | Description |
|---|---|---|
| Vendor | WP_User | Display Name and ID of the vendor who submitted the request. |
| Amount | post_meta | Requested payout amount (formatted with wc_price). |
| Balance | Ledger | Vendor's current available balance in the Ledger table. |
| Status | post_status | Request status (Pending, Approved, Rejected). |
| Requested | post_date | Date the request was created (with GMT normalization). |
β‘ Bulk Actionsβ
Bulk Approveβ
Administrators can select multiple requests and trigger the central approval mechanism:
- Method:
process_bulk_approve() - How it works: Calls
GovernanceService::process_approvalfor each selected ID. - Idempotency: Only
pendingrequests are processed; already-approved ones are skipped (double-debit protection).
π Status and Color Codesβ
The table visualizes transaction statuses with dynamic colors:
- π‘ Pending: Awaiting approval.
- π΅ Approved: Approved (payment order issued).
- π’ Confirmed: Finalized (completed on the bank/processor side).
- π΄ Rejected / Failed: Rejected or an error occurred.
π‘οΈ Security and Authorizationβ
- Capability: The
mhm_rentiva_approve_payoutcapability is required to perform bulk actions. - Nonce: All bulk actions pass through standard WP security.
- Idempotency Guard: Inside
PayoutListTable, apost_statuscheck is performed before each operation to prevent duplicate processing at the code level.
Section Summaryβ
PayoutListTableis an internal admin tool that displays the financial ledger.- Data is fetched in a hybrid manner from
Ledgerandpost_meta. - Bulk approval passes through the GovernanceService filter.
Changelogβ
| Date | Version | Note |
|---|---|---|
| 23.04.2026 | 4.27.2 | English translation added. |
| 19.03.2026 | 4.21.2 | PayoutListTable class updated with bulk approve and ledger integration. |