fix(users): restore WeChat template notification flow

This commit is contained in:
kate522 committed 2026-11-10 20:54:24 +08:00
1 parent 30ceab4615
commit 7fe26d3fff
18 files changed
+1051 -763

No files matched your search

+3
View File
@@ -422,6 +422,7 @@ function jio_notify_post_author_of_comment(WP_Comment $comment): void {
'url' => get_comment_link($comment),
]);
update_comment_meta($comment->comment_ID, 'jio_post_comment_notified', 1);
do_action('jio_wechat_comment_postauthor', $owner_id, $comment);
}
add_action('wp_insert_comment', function ($comment_id, $comment) {
@@ -445,6 +446,7 @@ add_action('wp_insert_comment', function ($comment_id, $comment) {
'url' => $url ?: get_permalink($post_id),
]);
update_comment_meta($comment_id, 'jio_reply_notified', 1);
do_action('jio_wechat_comment_parent', $target_user_id, $comment);
}, 20, 2);
add_action('transition_comment_status', function ($new_status, $old_status, $comment) {
@@ -478,6 +480,7 @@ add_action('transition_comment_status', function ($new_status, $old_status, $com
'url' => get_comment_link($comment),
]);
update_comment_meta($comment->comment_ID, 'jio_reply_notified', 1);
do_action('jio_wechat_comment_parent', $target_user_id, $comment);
}, 20, 3);
add_action('jio_post_favorited', function (int $post_id, int $actor_id, bool $active): void {
+1
View File
@@ -353,6 +353,7 @@ add_action('wp_ajax_jio_change_email', function (): void {
\Jio\Extensions\SecurityHardening::error_frequency_clear();
}
update_user_meta($user_id, 'jio_email_verified', 1);
do_action('jio_user_email_changed', $user_id, $new_email, $old_email);
if ($old_email !== '' && is_email($old_email) && class_exists('\Jio\Settings\Settings')) {
\Jio\Settings\Settings::send_event_email('change_notice', $old_email, [
'{username}' => $user->display_name,