feat: adjust affiliate commissions and withdrawal strategy

This commit is contained in:
kate522 committed 2026-08-16 23:11:01 +08:00
1 parent 8fc6fe5312
commit 929603b9e2
13 files changed
+93 -111

No files matched your search

+2 -1
View File
@@ -197,7 +197,8 @@ final class ReferralAttribution {
return new \WP_REST_Response([
'code' => $link['code'],
'url' => $link['url'],
'ratio' => (float) ($settings['ratio'] ?? 5),
'current_ratio' => (float) \AKSRT\Settings\Settings::affiliate_ratio_for_user($uid),
'ratios' => (array) ($settings['ratios'] ?? []),
'order_types' => (array) ($settings['order_types'] ?? ['membership', 'content']),
'rules' => ['window_days' => (int) ($settings['window_days'] ?? 30), 'settlement_days' => (int) ($settings['settlement_days'] ?? 7)],
'stats' => $stats,