fix(email): complete mail settings and templates

This commit is contained in:
kate522 committed 2026-09-04 12:06:42 +08:00
1 parent 4f8ab94fac
commit 4833053a5c
29 files changed
+716 -426

No files matched your search

+8 -1
View File
@@ -219,7 +219,7 @@ function aksrt_add_user_notification(int $user_id, array $payload): void {
if ($table === '') return;
$wpdb->insert($table, [
$inserted = $wpdb->insert($table, [
'user_id' => $user_id,
'type' => $type,
'title' => sanitize_text_field((string) ($payload['title'] ?? '')),
@@ -229,6 +229,13 @@ function aksrt_add_user_notification(int $user_id, array $payload): void {
'created_at' => $created_at,
'read_at' => !empty($payload['read']) ? current_time('mysql', true) : null,
], ['%d', '%s', '%s', '%s', '%s', '%d', '%s', '%s']);
if ($inserted !== false) {
do_action('aksrt_notification_sent', $user_id, $type, [
'title' => (string) ($payload['title'] ?? ''),
'description' => (string) ($payload['desc'] ?? ''),
'target_url' => (string) ($payload['url'] ?? ''),
]);
}
}
endif;