feat(pay): sales volume, paid order meta, pending resume, limit-over buy

Bump content sales on resource order paid; show order number/time in download
box; poll pending gateway payments; support download_limit_over_price overbuy.
This commit is contained in:
kate522 committed 2026-07-14 12:04:59 +08:00
1 parent 770205623d
commit 8f15d16d35
8 files changed
+397 -72

No files matched your search

+13 -5
View File
@@ -270,14 +270,22 @@ if (!function_exists('aksrt_check_free_download_quota')) {
$used = aksrt_get_user_free_downloaded_number($user_id);
if ($used >= $limit) {
$data = [
'status' => 429,
'limit' => $limit,
'used' => $used,
];
// Optional overbuy price for free-quota exhausted (Zibll download_limit_over_price).
// Callers may pass post context via filter.
$over = apply_filters('aksrt_download_limit_over_price', 0.0, $user_id);
if ($over > 0) {
$data['download_limit_over_price'] = $over;
$data['allow_limit_over'] = true;
}
return new WP_Error(
'aksrt_download_limit',
__('您今日下载免费资源个数已超限,请明日再下载。', 'aksrt'),
[
'status' => 429,
'limit' => $limit,
'used' => $used,
]
$data
);
}