fix(admin): stop the ticket process form from white-screening on submit

The process form posted to admin-post.php without a hidden action field,
so no admin_post_{action} hook fired and WordPress returned a blank
page. Dispatch to aksrt_users_update_report / aksrt_users_process_appeal
per ticket kind, matching every other native form, and lock the contract
in the report test.
This commit is contained in:
2026-09-20 14:56:08 +08:00
parent 3d4179a756
commit 9cc9ff6d52
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -399,6 +399,9 @@ trait UsersMenusTickets {
$kind = $row['kind'];
echo '<form method="post" action="' . esc_url(admin_url('admin-post.php')) . '">';
// admin-post.php 依赖 $_REQUEST['action'] 触发 admin_post_{action} 钩子;
// 缺失时 WordPress 不输出任何内容(白屏),这里按工单类型分发。
echo '<input type="hidden" name="action" value="' . esc_attr($kind === 'report' ? 'aksrt_users_update_report' : 'aksrt_users_process_appeal') . '" />';
echo '<table class="form-table"><tbody>';
if ($kind === 'report') {